@@ -10910,3 +10910,77 @@ CHECK_NO_CHANGE_AFTER_RECOMPUTE
10910
10910
10911
10911
AT_CLEANUP
10912
10912
])
10913
+
10914
+ OVN_FOR_EACH_NORTHD_NO_HV([
10915
+ AT_SETUP([Distributed gw port skip conntrack option])
10916
+ ovn_start
10917
+
10918
+ ovn-sbctl chassis-add gw1 geneve 127.0.0.1
10919
+
10920
+ ovn-nbctl lr-add R1
10921
+ ovn-nbctl lrp-add R1 R1-S1 02:ac:10:01:00:01 172.16.1.1/24
10922
+ ovn-nbctl lrp-set-gateway-chassis R1-S1 gw1
10923
+
10924
+ ovn-nbctl ls-add S1
10925
+ ovn-nbctl lsp-add S1 S1-R1
10926
+ ovn-nbctl lsp-set-type S1-R1 router
10927
+ ovn-nbctl lsp-set-addresses S1-R1 router
10928
+ ovn-nbctl --wait=sb lsp-set-options S1-R1 router-port=R1-S1
10929
+ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
10930
+
10931
+ # Add the router gw port to one port_group which has stateful acls
10932
+ ovn-nbctl --wait=sb pg-add pg_dgw
10933
+ ovn-nbctl --wait=sb pg-set-ports pg_dgw S1-R1
10934
+ ovn-nbctl acl-add pg_dgw from-lport 1002 "inport == @pg_dgw && ip4" allow-related
10935
+ ovn-nbctl acl-add pg_dgw to-lport 1003 "outport == @pg_dgw && ip4" allow-related
10936
+
10937
+ # Check skip conntrack option with 'lsp_skip_conntrack' default (false)
10938
+ AT_CHECK([ovn-sbctl dump-flows S1 | grep pre_acl | sed 's/table=./table=?/'], [0], [dnl
10939
+ table=? (ls_in_pre_acl ), priority=110 , match=(eth.dst == $svc_monitor_mac), action=(next;)
10940
+ table=? (ls_in_pre_acl ), priority=110 , match=(eth.mcast), action=(next;)
10941
+ table=? (ls_in_pre_acl ), priority=110 , match=(ip && inport == "S1-R1"), action=(next;)
10942
+ table=? (ls_in_pre_acl ), priority=110 , match=(nd || nd_rs || nd_ra || mldv1 || mldv2 || (udp && udp.src == 546 && udp.dst == 547)), action=(next;)
10943
+ table=? (ls_in_pre_acl ), priority=100 , match=(ip), action=(reg0[[0]] = 1; next;)
10944
+ table=? (ls_in_pre_acl ), priority=0 , match=(1), action=(next;)
10945
+ table=? (ls_out_pre_acl ), priority=110 , match=(eth.mcast), action=(next;)
10946
+ table=? (ls_out_pre_acl ), priority=110 , match=(eth.src == $svc_monitor_mac), action=(next;)
10947
+ table=? (ls_out_pre_acl ), priority=110 , match=(ip && outport == "S1-R1"), action=(next;)
10948
+ table=? (ls_out_pre_acl ), priority=110 , match=(nd || nd_rs || nd_ra || mldv1 || mldv2 || (udp && udp.src == 546 && udp.dst == 547)), action=(next;)
10949
+ table=? (ls_out_pre_acl ), priority=100 , match=(ip), action=(reg0[[0]] = 1; next;)
10950
+ table=? (ls_out_pre_acl ), priority=0 , match=(1), action=(next;)
10951
+ ])
10952
+
10953
+ # Enable 'lsp_skip_conntrack' and check the flows
10954
+ AT_CHECK([ovn-nbctl --wait=sb lsp-set-options S1-R1 router-port=R1-S1 lsp_skip_conntrack=true])
10955
+ AT_CHECK([ovn-sbctl dump-flows S1 | grep pre_acl | sed 's/table=./table=?/'], [0], [dnl
10956
+ table=? (ls_in_pre_acl ), priority=110 , match=(eth.dst == $svc_monitor_mac), action=(next;)
10957
+ table=? (ls_in_pre_acl ), priority=110 , match=(eth.mcast), action=(next;)
10958
+ table=? (ls_in_pre_acl ), priority=110 , match=(nd || nd_rs || nd_ra || mldv1 || mldv2 || (udp && udp.src == 546 && udp.dst == 547)), action=(next;)
10959
+ table=? (ls_in_pre_acl ), priority=100 , match=(ip), action=(reg0[[0]] = 1; next;)
10960
+ table=? (ls_in_pre_acl ), priority=0 , match=(1), action=(next;)
10961
+ table=? (ls_out_pre_acl ), priority=110 , match=(eth.mcast), action=(next;)
10962
+ table=? (ls_out_pre_acl ), priority=110 , match=(eth.src == $svc_monitor_mac), action=(next;)
10963
+ table=? (ls_out_pre_acl ), priority=110 , match=(nd || nd_rs || nd_ra || mldv1 || mldv2 || (udp && udp.src == 546 && udp.dst == 547)), action=(next;)
10964
+ table=? (ls_out_pre_acl ), priority=100 , match=(ip), action=(reg0[[0]] = 1; next;)
10965
+ table=? (ls_out_pre_acl ), priority=0 , match=(1), action=(next;)
10966
+ ])
10967
+
10968
+ # Disable 'lsp_skip_conntrack' and check the flows
10969
+ AT_CHECK([ovn-nbctl --wait=sb lsp-set-options S1-R1 router-port=R1-S1 lsp_skip_conntrack=false])
10970
+ AT_CHECK([ovn-sbctl dump-flows S1 | grep pre_acl | sed 's/table=./table=?/'], [0], [dnl
10971
+ table=? (ls_in_pre_acl ), priority=110 , match=(eth.dst == $svc_monitor_mac), action=(next;)
10972
+ table=? (ls_in_pre_acl ), priority=110 , match=(eth.mcast), action=(next;)
10973
+ table=? (ls_in_pre_acl ), priority=110 , match=(ip && inport == "S1-R1"), action=(next;)
10974
+ table=? (ls_in_pre_acl ), priority=110 , match=(nd || nd_rs || nd_ra || mldv1 || mldv2 || (udp && udp.src == 546 && udp.dst == 547)), action=(next;)
10975
+ table=? (ls_in_pre_acl ), priority=100 , match=(ip), action=(reg0[[0]] = 1; next;)
10976
+ table=? (ls_in_pre_acl ), priority=0 , match=(1), action=(next;)
10977
+ table=? (ls_out_pre_acl ), priority=110 , match=(eth.mcast), action=(next;)
10978
+ table=? (ls_out_pre_acl ), priority=110 , match=(eth.src == $svc_monitor_mac), action=(next;)
10979
+ table=? (ls_out_pre_acl ), priority=110 , match=(ip && outport == "S1-R1"), action=(next;)
10980
+ table=? (ls_out_pre_acl ), priority=110 , match=(nd || nd_rs || nd_ra || mldv1 || mldv2 || (udp && udp.src == 546 && udp.dst == 547)), action=(next;)
10981
+ table=? (ls_out_pre_acl ), priority=100 , match=(ip), action=(reg0[[0]] = 1; next;)
10982
+ table=? (ls_out_pre_acl ), priority=0 , match=(1), action=(next;)
10983
+ ])
10984
+
10985
+ AT_CLEANUP
10986
+ ])
0 commit comments