openvswitch / ovs-issues

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

No offload of tunnel push in OvS-DPDK #266

Open janek-zieleznicki-codilime opened 1 year ago

janek-zieleznicki-codilime commented 1 year ago

Hi,

I configured vxLAN tunnel between two OvS instances with the following configuration:

ovs-ctl start
ovs-vsctl --no-wait set Open_vSwitch . \
        other_config:dpdk-init=true
ovs-vsctl set Open_vSwitch . \
        other_config:hw-offload=true
ovs-ctl restart
ovs-vsctl --if-exists del-br br-int
ovs-vsctl --if-exists del-br br-phy

# configure ovs
ovs-vsctl --may-exist add-br br-int \
  -- set Bridge br-int datapath_type=netdev \
  -- br-set-external-id br-int bridge-id br-int \
  -- set bridge br-int fail-mode=standalone

ovs-vsctl add-port br-int vm_port0 \
  -- set Interface vm_port0 type=dpdkvhostuserclient \
    options:vhost-server-path=/tmp/vm_port0

ovs-vsctl add-port br-int vxlan0 \
  -- set interface vxlan0 type=vxlan options:remote_ip=172.168.1.2

ovs-vsctl --may-exist add-br br-phy \
  -- set Bridge br-phy datapath_type=netdev \
  -- br-set-external-id br-phy bridge-id br-phy \
  -- set bridge br-phy fail-mode=standalone

ovs-vsctl --timeout 10 add-port br-phy dpdk0 \
  -- set Interface dpdk0 type=dpdk options:dpdk-devargs=0000:06:00.0

ip addr add 172.168.1.1/24 dev br-phy
ip link set br-phy up
iptables -F
ovs-appctl ovs/route/add 172.168.1.1/24 br-phy

Then tried catching the offload attempts in netdev-offload-dpdk.c and it seems that only OVS_ACTION_ATTR_TUNNEL_POP is send. There is never a call with OVS_ACTION_ATTR_TUNNEL_PUSH.

I tested it on branch-v3.0 with DPDK 21.11.2 and on branch-v2.16.0 with DPDK 20.11.6 with same results.

Furthermore i tested the VLAN offload with same results: OVS_ACTION_ATTR_POP_VLAN is offloaded but OVS_ACTION_ATTR_PUSH_VLAN is not.

I run my tests on virtio, ixgbe and nfp drivers, with same results.

Is there something wrong with my configuration, or is this a bug?

igsilya commented 1 year ago

So, you're sending traffic between a vhost-user port and a physical NIC, AFAICT. Traffic from vhost-user to physical NIC cannot be offloaded, because it originates in software. Traffic in the opposite direction can be partially offloaded, because it goes from the hardware. Partial offload is classification offload. No actions are offloaded in any case.