@khooixz, thank you very much! Disabling the offloads on the physical end host interfaces did the trick. I have tried every trick in my disposal such as using linux bridges, separate namespaces and even virtual interfaces which did not work. But this helps a lot for me to work with. I was hesitant to use P4 to DPDK (T4P4S) based compilers for running my P4 application, since I am a noob with DPDK and am not well versed with its usage. This saves a lot of my time!
In case the link does not work in the future, I am quoting the solution here:
Sorry if this is something you already did.
But did you try to spawn 2 simple_switch on the same VMs ?
If really network isolation is needed you can create Linux namespace in order to separate them.
As a side note you might be hit by the bug Andy put in evidence ?
p4-guide/linux-veth-bug at master · jafingerhut/p4-guide · GitHub
If not its s also a good idea to switch off linux kernel TCP offload (in your end host [VM or Physical device]) :
As superuser you can run: ($1 your interface name)
ifconfig $1 multicast allmulti promisc mtu 1500 up
ethtool -K $1 rx off
ethtool -K $1 tx off
ethtool -K $1 sg off
ethtool -K $1 tso off
ethtool -K $1 ufo off
ethtool -K $1 gso off
ethtool -K $1 gro off
ethtool -K $1 lro off
ethtool -K $1 rxvlan off
ethtool -K $1 txvlan off
ethtool -K $1 ntuple off
ethtool -K $1 rxhash off
ethtool --set-eee $1 eee off