Bug 1773937

Summary: csum are different on two chassis when ovn-encap-csum is set
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jianlin Shi <jishi>
Component: openvswitch2.13Assignee: Adrián Moreno <amorenoz>
Status: NEW --- QA Contact: Jianlin Shi <jishi>
Severity: medium Docs Contact:
Priority: medium    
Version: FDP 19.GCC: ctrautma, dcbw, jhsiao, jishi, qding, ralongi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jianlin Shi 2019-11-19 11:22:54 UTC
Description of problem:
csum are different on two chassis when ovn-encap-csum is set

Version-Release number of selected component (if applicable):
ovn2.12-2.12.0-7
openvswitch2.12-2.12.0-4

How reproducible:
Always

Steps to Reproduce:
1. set csum as false on one chassis
systemctl restart openvswitch
systemctl restart ovn-northd

ovn-nbctl set-connection ptcp:6641
ovn-sbctl set-connection ptcp:6642

ovs-vsctl set Open_vSwitch . external-ids:system-id=hv1 external-ids:ovn-remote=tcp:20.0.29.25:6642 external-ids:ovn-encap-type=geneve external-ids:ovn-encap-ip=20.0.29.25 external_ids:ovn-bridge=ovn-test external-ids:ovn-encap-csum=false

systemctl restart ovn-controller

ovn-nbctl ls-add ls1                                                                                  
ovn-nbctl lsp-add ls1 ls1p1                                                                           
ovn-nbctl lsp-set-addresses ls1p1 00:00:00:01:00:02                                                   
                                                                                                      
ovn-nbctl lsp-add ls1 ls1p2                                                                           
ovn-nbctl lsp-set-addresses ls1p2 00:00:00:01:01:02                                                   
                                                                                                      
ovn-nbctl lsp-add ls1 ls1p3                                                                           
ovn-nbctl lsp-set-addresses ls1p3 00:00:00:01:00:03                                                   
                                                                                                      
ip netns add client0                                                                                  
ip link add veth0_c0 type veth peer name veth0_c0_p                                                   
ip link set veth0_c0 netns client0                                                                    
ip netns exec client0 ip link set veth0_c0 up                                                         
ip netns exec client0 ip link set veth0_c0 address 00:00:00:01:00:02                                  
ip netns exec client0 ip addr add 1.1.1.1/24 dev veth0_c0                                             
ip netns exec client0 ip link set lo up                                                               

ip netns add client1
ip link add veth0_c1 type veth peer name veth0_c1_p
ip link set veth0_c1 netns client1
ip netns exec client1 ip link set veth0_c1 up
ip netns exec client1 ip link set veth0_c1 address 00:00:00:01:01:02
ip netns exec client1 ip addr add 1.1.1.2/24 dev veth0_c1
ip netns exec client1 ip link set lo up

ovs-vsctl add-port ovn-test veth0_c0_p
ovs-vsctl add-port ovn-test veth0_c1_p
ip link set veth0_c0_p up
ip link set veth0_c1_p up
ovs-vsctl set interface veth0_c0_p external_ids:iface-id=ls1p1
ovs-vsctl set interface veth0_c1_p external_ids:iface-id=ls1p2

2. set csum as true on the other chassis:

systemctl restart openvswitch
ovs-vsctl set Open_vSwitch . external-ids:system-id=hv0 external-ids:ovn-remote=tcp:20.0.29.25:6642 external-ids:ovn-encap-type=geneve external-ids:ovn-encap-ip=20.0.29.26 external-ids:ovn-encap-csum=true

systemctl restart ovn-controller

ip netns add server0
ip link add veth0_s0 type veth peer name veth0_s0_p
ip link set veth0_s0 netns server0
ip netns exec server0 ip link set veth0_s0 up
ip netns exec server0 ip link set veth0_s0 address 00:00:00:01:00:03
ip netns exec server0 ip addr add 1.1.1.3/24 dev veth0_s0
ip netns exec server0 ip link set lo up

ovs-vsctl add-port br-int veth0_s0_p
ip link set veth0_s0_p up
ovs-vsctl set interface veth0_s0_p external_ids:iface-id=ls1p3
3.

Actual results:
one side shows csum=false, and the other side shows true
[root@dell-per740-12 test]# ovs-vsctl show                                                            
d6668bef-4ed5-42e1-9eb1-0f7a4e959381                                                                  
    Bridge ovn-test
        fail_mode: secure                                                                             
        Port "veth0_c1_p"                                                                             
            Interface "veth0_c1_p"                                                                    
        Port "veth0_c0_p"                                                                             
            Interface "veth0_c0_p"                                                                    
        Port ovn-test                                                                                 
            Interface ovn-test                                                                        
                type: internal                                                                        
        Port "ovn-hv0-0"                                                                              
            Interface "ovn-hv0-0"                                                                     
                type: geneve                                                                          
                options: {csum="true", key=flow, remote_ip="20.0.29.26"}                              
    ovs_version: "2.12.0"

[root@ibm-x3650m5-03 test]# ovs-vsctl show
41788c5b-b1d3-4190-868e-6882fca4d327
    Bridge br-int
        fail_mode: secure
        Port "ovn-hv1-0"
            Interface "ovn-hv1-0"
                type: geneve
                options: {csum="false", key=flow, remote_ip="20.0.29.25"}
        Port "veth0_s0_p"
            Interface "veth0_s0_p"
        Port br-int
            Interface br-int                                                                          
                type: internal
    ovs_version: "2.12.0"

Expected results:


Additional info:

[root@dell-per740-12 test]# ovs-vsctl list open
_uuid               : d6668bef-4ed5-42e1-9eb1-0f7a4e959381
bridges             : [b4093ccf-8fec-4e81-a54c-d6139ee550ac]
cur_cfg             : 5
datapath_types      : [netdev, system]
db_version          : "8.0.0"
dpdk_initialized    : false
dpdk_version        : "DPDK 18.11.2"
external_ids        : {hostname="dell-per740-12.rhts.eng.pek2.redhat.com", ovn-bridge=ovn-test, ovn-encap-csum="false", ovn-encap-ip="20.0.29.25", ovn-encap-type=geneve, ovn-remote="tcp:20.0.29.25:6642", rundir="/var/run/openvswitch", system-id="hv1"}
iface_types         : [erspan, geneve, gre, internal, "ip6erspan", "ip6gre", lisp, patch, stt, system, tap, vxlan]
manager_options     : []
next_cfg            : 5
other_config        : {}
ovs_version         : "2.12.0"
ssl                 : []
statistics          : {}
system_type         : rhel
system_version      : "7.7"
[root@dell-per740-12 test]# ovn-sbctl list encap
_uuid               : 59e9f4ae-b3e1-461a-a6ad-dd7a77272f12
chassis_name        : hv1
ip                  : "20.0.29.25"
options             : {csum="false"}
type                : geneve

_uuid               : d832d9da-d0af-4595-8b4e-21a7ca4205ae
chassis_name        : hv0
ip                  : "20.0.29.26"
options             : {csum="true"}
type                : geneve
[root@dell-per740-12 test]# ovn-sbctl show
Chassis hv0
    hostname: ibm-x3650m5-03.rhts.eng.pek2.redhat.com
    Encap geneve
        ip: "20.0.29.26"
        options: {csum="true"}
    Port_Binding ls1p3
Chassis hv1
    hostname: dell-per740-12.rhts.eng.pek2.redhat.com
    Encap geneve
        ip: "20.0.29.25"
        options: {csum="false"}
    Port_Binding ls1p2
    Port_Binding ls1p1

[root@ibm-x3650m5-03 test]# ovs-vsctl list open
_uuid               : 41788c5b-b1d3-4190-868e-6882fca4d327
bridges             : [35af32d7-5772-43b0-a202-23c4ebb0f0ba]
cur_cfg             : 3
datapath_types      : [netdev, system]
db_version          : "8.0.0"
dpdk_initialized    : false
dpdk_version        : "DPDK 18.11.2"
external_ids        : {hostname="ibm-x3650m5-03.rhts.eng.pek2.redhat.com", ovn-encap-csum="true", ovn-encap-ip="20.0.29.26", ovn-encap-type=geneve, ovn-remote="tcp:20.0.29.25:6642", rundir="/var/run/openvswitch", system-id="hv0"}
iface_types         : [erspan, geneve, gre, internal, "ip6erspan", "ip6gre", lisp, patch, stt, system, tap, vxlan]
manager_options     : []
next_cfg            : 3
other_config        : {}
ovs_version         : "2.12.0"
ssl                 : []
statistics          : {}
system_type         : rhel
system_version      : "7.7"

[root@ibm-x3650m5-03 test]# rpm -qa | grep -E "openvswitch|ovn"
openvswitch2.12-2.12.0-4.el7fdp.x86_64
kernel-kernel-networking-openvswitch-ovn-basic-1.0-8.noarch
ovn2.12-2.12.0-7.el7fdp.x86_64
ovn2.12-host-2.12.0-7.el7fdp.x86_64
kernel-kernel-networking-openvswitch-ovn-common-1.0-5.noarch
openvswitch-selinux-extra-policy-1.0-14.el7fdp.noarch
ovn2.12-debuginfo-2.12.0-7.el7fdp.x86_64
ovn2.12-central-2.12.0-7.el7fdp.x86_64

Comment 1 Dan Williams 2020-11-10 14:30:01 UTC
Jianlin, is this still a problem with ovn2.13?

Comment 2 Jianlin Shi 2020-11-16 06:49:46 UTC
(In reply to Dan Williams from comment #1)
> Jianlin, is this still a problem with ovn2.13?

sorry for late response, we were busy with testing 20.I.

the problem still exist on ovn2.13-20.09.0-12:

[root@wsfd-advnetlab19 bz1773937]# ovs-vsctl show                                                     
7ead47f7-51ef-47d6-bc19-755e1627123b                                                                  
    Bridge ovn-test                                                                                   
        fail_mode: secure                                                                             
        Port veth0_c1_p                                                                               
            Interface veth0_c1_p                                                                      
        Port veth0_c0_p                                                                               
            Interface veth0_c0_p                                                                      
        Port ovn-hv0-0                                                                                
            Interface ovn-hv0-0                                                                       
                type: geneve                                                                          
                options: {csum="true", key=flow, remote_ip="20.0.153.26"}   

<=== true
                          
        Port ovn-test                                                                                 
            Interface ovn-test                                                                        
                type: internal                                                                        
    ovs_version: "2.13.2"                                                                             
[root@wsfd-advnetlab19 bz1773937]# rpm -qa | grep -E "openvswitch|ovn"                                
openvswitch2.13-2.13.0-61.el7fdp.x86_64                                                               
ovn2.13-20.09.0-12.el7fdp.x86_64                                                                      
openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch                                                 
ovn2.13-central-20.09.0-12.el7fdp.x86_64                                                              
ovn2.13-host-20.09.0-12.el7fdp.x86_64

[root@wsfd-advnetlab18 bz1773937]# ovs-vsctl show                                                     
45747ac3-ce2b-499a-b9f5-c20f9d6cd672                                                                  
    Bridge br-int                                                                                     
        fail_mode: secure                                                                             
        Port br-int                                                                                   
            Interface br-int                                                                          
                type: internal                                                                        
        Port veth0_s0_p                                                                               
            Interface veth0_s0_p                                                                      
        Port ovn-hv1-0                                                                                
            Interface ovn-hv1-0                                                                       
                type: geneve                                                                          
                options: {csum="false", key=flow, remote_ip="20.0.153.25"}                            
    ovs_version: "2.13.2"

<=== false