Bug 1935663

Summary: [RFE] Add documentation and a self test to OVS for the NULL snat case
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Eelco Chaudron <echaudro>
Component: openvswitch2.13Assignee: Eelco Chaudron <echaudro>
Status: CLOSED UPSTREAM QA Contact: Jiying Qiu <jiqiu>
Severity: medium Docs Contact:
Priority: high    
Version: FDB 18.04CC: ctrautma, dcbw, eminguez, jhsiao, qding, ralongi, rkhan
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: 2021-07-19 13:17:13 UTC 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:
Bug Depends On:    
Bug Blocks: 1935666, 1939676    
Attachments:
Description Flags
reproducer none

Description Eelco Chaudron 2021-03-05 10:43:50 UTC
We need to make sure rules like "ct(commit,nat(src=0.0.0.0),table=30)" continue to be supported by OVS. This is related to the following:

https://bugzilla.redhat.com/show_bug.cgi?id=1910378#c70
https://bugzilla.redhat.com/show_bug.cgi?id=1910378#c71

Comment 1 Eelco Chaudron 2021-03-17 10:46:35 UTC
Sent patch upstream for review:

https://mail.openvswitch.org/pipermail/ovs-dev/2021-March/381293.html

Comment 3 Rashid Khan 2021-05-26 19:39:08 UTC
This is needed for an OVN Feature as per Dcbw. 
Eelco if this is truely in POST State, can you please help expedite the reviews and release into the FD build 
If the patches need another revision, please let me know if you want me to help you make a priority call. 

Thanks

Comment 4 Eelco Chaudron 2021-05-27 07:14:11 UTC
(In reply to Rashid Khan from comment #3)
> This is needed for an OVN Feature as per Dcbw. 
> Eelco if this is truely in POST State, can you please help expedite the
> reviews and release into the FD build 
> If the patches need another revision, please let me know if you want me to
> help you make a priority call. 

This BZ is for the kernel datapath, and for this to work OVS does not need any code change. It's already being used as-is for openshift-sdn. This change only adds documentation, and a test case, so the feature will not be broken in a later release of OVS.

The real requirement is BZ1935666, which adds support for this feature to the userspace datapath. Paolo has a patch out, will ping him today as he was working on an additional change requested by Dumitru.

Comment 5 Eelco Chaudron 2021-05-27 14:33:22 UTC
(In reply to Eelco Chaudron from comment #4)

Discussed this with Dumitru and Paolo, but it looks like we might need some support from my side. i.e. a way to determine if all-zero SNAT is supported, as OVN can't determine this by datapath type.

I will work on this as my first priority.

Comment 6 Eelco Chaudron 2021-06-02 13:37:08 UTC
Sent v4 upstream to include feature check:

https://patchwork.ozlabs.org/project/openvswitch/list/?series=246859

Comment 7 Jiying Qiu 2021-06-17 09:39:47 UTC
Created attachment 1791739 [details]
reproducer

Comment 8 Jiying Qiu 2021-06-17 09:43:58 UTC
Verified with kernel-4.18.0-305.el8.x86_64 and openvswitch2.15-2.15.0-22.el8fdp.x86_64.

Have put the reproducer to attachment. It should run under beaker environment.

#ovs-appctl dpctl/dump-conntrack - L  |grep 10.1.1.1
tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=30000,dport=9443),reply=(src=10.1.1.2,dst=10.1.1.1,sport=9443,dport=5646),zone=1,protoinfo=(state=ESTABLISHED)
tcp,orig=(src=10.1.1.1,dst=172.30.1.1,sport=30000,dport=9443),reply=(src=10.1.1.2,dst=10.1.1.1,sport=9443,dport=30000),zone=1,protoinfo=(state=ESTABLISHED)
tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=30001,dport=9443),reply=(src=10.1.1.2,dst=10.1.1.1,sport=9443,dport=30001),zone=1,protoinfo=(state=ESTABLISHED)

Comment 10 Eelco Chaudron 2021-07-14 12:47:38 UTC
Got approved in master, and backported to 2.15. I will work on a manual backport to v2.13.