Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1927230

Summary: [OVN]ipv4/ipv6 flows are marked ct flags without any acl attached to ports
Product: Red Hat OpenStack Reporter: Haresh Khandelwal <hakhande>
Component: python-networking-ovnAssignee: Yariv <yrachman>
Status: CLOSED CURRENTRELEASE QA Contact: Eran Kuris <ekuris>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 16.1 (Train)CC: apevec, cfields, ctrautma, dalvarez, dceara, jishi, jlibosva, jraju, kfida, lhh, majopela, mleitner, oblaut, ralongi, scohen, slinaber, spower, sputhenp, supadhya, yrachman
Target Milestone: z4Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1927211 Environment:
Last Closed: 2021-05-24 16:37:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1927211    
Bug Blocks:    

Description Haresh Khandelwal 2021-02-10 11:24:01 UTC
+++ This bug was initially created as a clone of Bug #1927211 +++

Description of problem:
On RHOSP 16.1.4 which as 
RHEL: 8.2 
Kernel: 4.18.0-193.41.1.el8_2.x86_64
OVS: openvswitch2.13-2.13.0-71.el8fdp.x86_64
OVN: ovn2.13-20.09.0-17.el8fdp.x86_64

While trying ovs hw offload with ml2/ovn, we see the issue that flows with ether type ipv4/ipv6 (0x0800/0x86dd) are marked with ct flags. Since rhel 8.2 doesnt support offloading of flows with ct flags (conntrack offload is not available in rhel8.2), packet steered via tc software data path.

This breaks feature functionality. 

Look at flow below. 
ufid:f3850114-4d46-4667-aaeb-8bc83f1ff378, skb_priority(0/0),skb_mark(0/0),ct_state(0/0x23),ct_zone(0/0),ct_mark(0/0),ct_label(0/0x1),recirc_id(0),dp_hash(0/0),in_port(ens1f1_1),packet_type(ns=0/0,id=0/0),eth(src=00:00:00:00:00:00/01:00:00:00:00:00,dst=f8:f2:1e:03:bf:f4),eth_type(0x86dd),ipv6(src=fe80::/ffc0::,dst=fe80::1234,label=0/0,proto=59,tclass=0/0x3,hlimit=64,frag=no), packets:44, bytes:2024, used:0.080s, dp:tc, actions:set(tunnel(tun_id=0x2,dst=152.20.0.11,ttl=64,tp_dst=6081,key6(bad key length 1, expected 0)(01)geneve({class=0x102,type=0x80,len=4,0x20003}),flags(key))),genev_sys_6081


dcera has provided fix and with that no ct flags marked and flows is offlaoded (check offloaded:yes)

ufid:ccc06bf5-bd56-4461-953e-042d0a8c6ac2, skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(ens1f1_1),packet_type(ns=0/0,id=0/0),eth(src=00:00:00:00:00:00/01:00:00:00:00:00,dst=f8:f2:1e:03:bf:f4),eth_type(0x86dd),ipv6(src=fe80::/ffc0::,dst=fe80::1234,label=0/0,proto=59,tclass=0/0x3,hlimit=64,frag=no), packets:30, bytes:3660, used:0.030s, offloaded:yes, dp:tc, 
<hakhande> actions:set(tunnel(tun_id=0x2,dst=152.20.0.11,ttl=64,tp_dst=6081,key6(bad key length 1, expected 0)(01)geneve({class=0x102,type=0x80,len=4,0x20003}),flags(key))),genev_sys_6081



Version-Release number of selected component (if applicable):
Mentioned in description

How reproducible:
Always

Steps to Reproduce:
1. Deploy 16.1.4 with hw offload
2. Make sure not attaching any security groups, port securitty on the port
3. Send traffic from VM (Ping should be fine)

Actual results:
Flows are not offloaded as they are marked with ct flags.

Expected results:
No ct flgas in rhel 8.2. 

Additional info:
Other ether types like mpls,arp dont exhibit this issue. 

ufid:b5d5e99d-adec-46f3-98ea-0dcf04377f79, skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(ens1f1_1),packet_type(ns=0/0,id=0/0),eth(src=00:00:00:00:00:00/01:00:00:00:00:00,dst=f8:f2:1e:03:bf:f3),eth_type(0x8847),mpls((bad key length 0), packets:68, bytes:8296, used:0.090s, offloaded:yes, dp:tc, actions:set(tunnel(tun_id=0x2,dst=152.20.0.11,ttl=64,tp_dst=6081,key6(bad key length 1, expected 0)(01)geneve({class=0x102,type=0x80,len=4,0x28001}),flags(key))),genev_sys_6081

--- Additional comment from Dumitru Ceara on 2021-02-10 11:22:02 UTC ---

Fix posted upstream for review: http://patchwork.ozlabs.org/project/ovn/list/?series=228905&state=*

Comment 2 Yariv 2021-02-24 15:10:06 UTC
Verified 
puddle RHOS-16.1-RHEL-8-20210216.n.1

ovs-appctl dpctl/dump-flows -m type=offloaded
ufid:e6ce7c1a-6331-420a-864d-16e2a298b5ac, skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(mx-bond),packet_type(ns=0/0,id=0/0),eth(src=fa:16:3e:85:21:75,dst=fa:16:3e:61:7d:11),eth_type(0x8100),vlan(vid=124,pcp=0),encap(eth_type(0x0800),ipv4(src=0.0.0.0/0.0.0.0,dst=0.0.0.0/0.0.0.0,proto=0/0,tos=0/0,ttl=0/0,frag=no)), packets:176, bytes:17160, used:0.470s, offloaded:yes, dp:tc, actions:pop_vlan,enp4s0f0_8


port mac 
fa:16:3e:61:7d:11

ip link show enp4s0f0
29: enp4s0f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc mq master mx-bond state UP mode DEFAULT group default qlen 1000
    link/ether ec:0d:9a:7d:7d:32 brd ff:ff:ff:ff:ff:ff

.....
    vf 8     link/ether fa:16:3e:61:7d:11 brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state disable, trust off, query_rss off