Hello, eth0 is bind with guest OS i.e. Linux driver. Secondly, AF_PACKET is not quite performant when compared with other alternatives. You can completely avoid AF_PACKET to directly attach eth0 to VPP. You can achieve it either using vpp native virtio driver (if eth0 is virtio interface) or dpdk.
To resolve connectivity issue, Please create VM with two interfaces, one for management interface and other one to be used with VPP. -br Mohsin From: <[email protected]> on behalf of "[email protected]" <[email protected]> Date: Wednesday, July 8, 2020 at 3:10 PM To: "[email protected]" <[email protected]> Subject: [vpp-dev] Low network performance and network connectivity issues with host-interface #vnet Hello, I am trying to test AF_PACKET performance with the following setup: I am running vagrant on my Ubuntu 18.04 with libvirt as a provider, 4 GB ram , 2 CPU cores "ip route" output: default via 192.168.121.1 dev eth0 proto dhcp src 192.168.121.109 metric 100 192.168.121.0/24 dev eth0 proto kernel scope link src 192.168.121.109 192.168.121.1 dev eth0 proto dhcp scope link src 192.168.121.109 metric 100 At this point I create host-interface and attach it to eth0 then I create a tap interface with MAC address the same as eth0's and rx and tx ring sizes equal to 4096. I put the newly created host-interface and tap interface in layer 2 bridge vpp# sh bridge-domain 1 det BD-ID Index BSN Age(min) Learning U-Forwrd UU-Flood Flooding ARP-Term arp-ufwd BVI-Intf 1 1 0 off on on flood on off off N/A Interface If-idx ISN SHG BVI TxFlood VLAN-Tag-Rewrite host-eth0 1 1 0 - * none tap0 2 1 0 - * none Then I set the host-interface rx-mode to polling: vpp# set interface rx-mode host-eth0 polling In the vagrant vm I confure tap0 to have the same IP address as eth0 and then flush eth0's IP address and at this point "ip route" output is: 192.168.121.0/24 dev tap0 proto kernel scope link src 192.168.121.109 Then I'm starting an iperf session but eventually I lose network connectivity to my vagrant vm iperf -c 192.168.121.1 -i1 -d Usually when I test this scenario I am getting a few lines of output due to the '-i1' option and my throughput is around 3Gbits/s on upload and barely 50Mbits/s on download. Fortunately I am able to connect to the vm using virt-manager sudo vppctl sh err Count Node Reason 9 af-packet-input partial packet 68 llc-input unknown llc ssap/dsap 44935 l2-output L2 output packets 45896 l2-learn L2 learn packets 3 l2-learn L2 learn misses 12 l2-learn L2 mac moves 45896 l2-input L2 input packets 959 l2-fwd Reflection Drop 2191 l2-flood L2 flood packets 2 l2-flood L2 replication complete 845 ethernet-input l3 mac mismatch 233 host-eth0-tx tx frame not ready 10857 host-eth0-tx tx sendto temporary failure I am using vpp v20.05-release
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16915): https://lists.fd.io/g/vpp-dev/message/16915 Mute This Topic: https://lists.fd.io/mt/75375698/21656 Mute #vnet: https://lists.fd.io/g/fdio+vpp-dev/mutehashtag/vnet Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
