openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

datapath_type to "netdev" only work on ping, no tcp connection #273

Closed chenglonglinux closed 1 year ago

chenglonglinux commented 1 year ago

I have installed Open vSwitch version 3.1.0 with the following configuration:

./configure --with-dpdk=shared --enable-shared --prefix=/usr --localstatedir=/var --sysconfdir=/etc I also installed DPDK version 22.11.1 using the following commands:

$ meson build $ ninja -C build $ sudo ninja -C build install When I configured the datapath_type to "netdev" using the command ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev, I built two VMs connected to the br0 bridge, each with an assigned IP address:

VM1: Port "ex-tap-cCd4PjYB", Interface "ex-tap-cCd4PjYB", IP address 192.168.1.1 VM2: Port "ex-tap-4PY0is4L", Interface "ex-tap-4PY0is4L", IP address 192.168.1.2 I am able to ping between 192.168.1.1 and 192.168.1.2, but I cannot connect via SSH or other ports.

However, when I changed the datapath_type to "system" using the command ovs-vsctl set bridge br0 datapath_type=system, I am able to ping and connect via SSH.

I do not think this issue is related to DPDK, as the problem persists even when the two VMs are connected to the same bridge and have not yet been connected to a physical port.

igsilya commented 1 year ago

Most likely reason for TCP connection to not work is TSO/checksum ofloading being enabled in VMs. You need to disable them for the VM's network interface configuration (e.g. in libvirt xml), or disable tx offloads via ethtool inside the guest system with ethtool -k $interface tx off. Alternatively, you may try enabling TSO support in OVS userspace datapath with: ovs-vsctl set Open_vSwitch . other_config:userspace-tso-enable=true.