Bug 2231081 - i40e driver: both ipv4 and ipv6 ping failed when sr-iov vf add to ovs bridge on ovs3.2
Summary: i40e driver: both ipv4 and ipv6 ping failed when sr-iov vf add to ovs bridge ...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch
Version: FDP 23.F
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Eelco Chaudron
QA Contact: liting
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-10 13:47 UTC by liting
Modified: 2023-08-17 13:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-3095 0 None None None 2023-08-10 13:49:50 UTC

Description liting 2023-08-10 13:47:34 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@dell-per730-52 ~]# uname -r
5.14.0-284.27.1.el9_2.x86_64
[root@dell-per730-52 ~]# rpm -qa|grep openvswitch
openvswitch-selinux-extra-policy-1.0-34.el9fdp.noarch
openvswitch3.2-3.2.0-0.2.el9fdp.x86_64
[root@dell-per730-52 ~]# rpm -qa|grep dpdk
dpdk-22.11-3.el9_2.x86_64
dpdk-tools-22.11-3.el9_2.x86_64


How reproducible:


Steps to Reproduce:
 dell730-52 i40e <--> dell730-53 i40e

on server side:
1. create two vfs for one pf 
[root@dell-per730-52 ~]# ip link show
7: enp7s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:ad:bc:e8 brd ff:ff:ff:ff:ff:ff
    vf 0     link/ether 00:60:2f:c5:65:b3 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off
    vf 1     link/ether 52:54:00:11:8f:ea brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust on


2.Bind vf 1 to dpdk, and add dpdk0 to ovs bridge.
 /usr/share/dpdk/usertools/dpdk-devbind.py -b vfio-pci 0000:07:02.1
 systemctl restart openvswitch
 ovs-vsctl set Open_vSwitch . 'other_config={}'
 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem=1024,1024
 ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x50000005000000
 ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
 ovs-vsctl add-port ovsbr0 dpdk0 -- set Interface dpdk0 type=dpdk type=dpdk options:dpdk-devargs=0000:07:02.1
 ovs-vsctl add-port ovsbr0 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient -- set Interface dpdkvhostuserclient0 options:vhost-server-path=/tmp/dpdkvhostuserclient0

[root@dell-per730-52 ~]# ovs-vsctl show
2b1cdab2-dca9-44b7-b666-3cfa27edf054
    Bridge ovsbr0
        datapath_type: netdev
        Port dpdkvhostuserclient0
            Interface dpdkvhostuserclient0
                type: dpdkvhostuserclient
                options: {vhost-server-path="/tmp/dpdkvhostuserclient0"}
        Port ovsbr0
            Interface ovsbr0
                type: internal
        Port dpdk0
            Interface dpdk0
                type: dpdk
                options: {dpdk-devargs="0000:07:02.1"}
    ovs_version: "3.2.0"


3.Configure the vf 1 mac same with guest's mac
ip link set enp3s0f0 vf 1 mac $guest_mac

4. Inside guest, configure ipv4 and ipv6 address for eth0
ip addr add 20.0.0.1/24 dev enp4s0
ip addr add 2001:5c0:9168::1/24 dev enp4s0

inside guest:
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:bb:63:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.138/24 brd 192.168.122.255 scope global dynamic noprefixroute enp2s0
       valid_lft 3257sec preferred_lft 3257sec
    inet6 fe80::da5d:7eab:c8e6:e0dc/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:11:8f:ea brd ff:ff:ff:ff:ff:ff
    inet 20.0.0.1/24 scope global enp4s0
       valid_lft forever preferred_lft forever
    inet6 2001:5c0:9168::1/24 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::522a:fe0c:c0c7:8045/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


on client side:
[root@dell-per730-53 ~]# ip link show
6: enp4s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:ad:bf:c4 brd ff:ff:ff:ff:ff:ff
    vf 0     link/ether 00:60:2f:1b:23:73 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off
    vf 1     link/ether 52:54:00:11:8f:e9 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust on

2.Bind vf 1 to dpdk, and add dpdk0 to ovs bridge.
 /usr/share/dpdk/usertools/dpdk-devbind.py -b vfio-pci 0000:04:02.1
 systemctl restart openvswitch
 ovs-vsctl set Open_vSwitch . 'other_config={}'
 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem=1024,1024
 ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x50000005000000
 ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
 ovs-vsctl add-port ovsbr0 dpdk0 -- set Interface dpdk0 type=dpdk type=dpdk options:dpdk-devargs=0000:04:02.1
 ovs-vsctl add-port ovsbr0 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient -- set Interface dpdkvhostuserclient0 options:vhost-server-path=/tmp/dpdkvhostuserclient0

[root@dell-per730-53 ~]# ovs-vsctl show
7bbd9e22-cbf4-434a-86a5-1e8e2949638f
    Bridge ovsbr0
        datapath_type: netdev
        Port dpdkvhostuserclient0
            Interface dpdkvhostuserclient0
                type: dpdkvhostuserclient
                options: {vhost-server-path="/tmp/dpdkvhostuserclient0"}
        Port dpdk0
            Interface dpdk0
                type: dpdk
                options: {dpdk-devargs="0000:04:02.1"}
        Port ovsbr0
            Interface ovsbr0
                type: internal
    ovs_version: "3.2.0"

3.Configure the vf 1 mac same with guest's mac
ip link set enp3s0f0 vf 1 mac $guest_mac

4. Inside guest, configure ipv4 and ipv6 address for eth0
ip addr add 20.0.0.2/24 dev enp4s0
ip addr add 2001:5c0:9168::2/24 dev enp4s0

guest:
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:bb:63:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.138/24 brd 192.168.122.255 scope global dynamic noprefixroute enp2s0
       valid_lft 3025sec preferred_lft 3025sec
    inet6 fe80::da5d:7eab:c8e6:e0dc/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:11:8f:e9 brd ff:ff:ff:ff:ff:ff
    inet 20.0.0.2/24 scope global enp4s0
       valid_lft forever preferred_lft forever
    inet6 2001:5c0:9168::2/24 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::ee61:e1d4:cbef:19a9/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


5. inside guest, ping the ipv4 and ipv6 address indise guest of server
ping 20.0.0.1
ping6 2001:5c0:9168::1

Actual results:
Ping ipv4 and ipv6 failed.


Expected results:
Ping ipv4 and ipv6 successfully.

Additional info:
https://beaker.engineering.redhat.com/jobs/8173772

Comment 3 Flavio Leitner 2023-08-10 18:30:04 UTC
Does it work with a recent OVS 3.1?
Thanks
fbl

Comment 8 Eelco Chaudron 2023-08-17 13:28:51 UTC
Looks like this is caused by the following commit:

 * 5d11c47d3 userspace: Enable IP checksum offloading by default.

Needs a follow up why.


Note You need to log in before you can comment on or make changes to this bug.