There is no need to build lflows for datapaths, where there are no vtep type lports. For instance, edge-outside logical switch, which has no vtep lports but has many chassis redirect lport, can have many useless lflows.
Signed-off-by: Vladislav Odintsov <[email protected]> --- northd/northd.c | 5 +++++ northd/ovn-northd.8.xml | 15 +++++++++------ tests/ovn-northd.at | 3 --- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index d6c26735d..e713973e7 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -7818,6 +7818,11 @@ build_lb_hairpin(struct ovn_datapath *od, struct hmap *lflows) static void build_vtep_hairpin(struct ovn_datapath *od, struct hmap *lflows) { + if (!od->has_vtep_lports) { + /* There is no need in these flows if datapath has no vtep lports. */ + return; + } + /* Ingress Pre-ARP flows for VTEP hairpining traffic. Priority 1000: * Packets that received from VTEP ports must go directly to L2LKP table. */ diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml index a8ef00a28..8164be300 100644 --- a/northd/ovn-northd.8.xml +++ b/northd/ovn-northd.8.xml @@ -1143,9 +1143,10 @@ <ul> <li> <p> - For each distributed gateway router port <var>RP</var> attached to - the logical switch and has chassis redirect port <var>cr-RP</var>, a - priority-2000 flow is added with the match + If logical switch has attached logical switch port of <var>vtep</var> + type, then for each distributed gateway router port <var>RP</var> + attached to this logical switch and has chassis redirect port + <var>cr-RP</var>, a priority-2000 flow is added with the match <pre> <code>reg0[14] == 1 && is_chassis_resident(<var>cr-RP</var>)</code> </pre> @@ -1159,9 +1160,11 @@ </li> <li> - A priority-1000 flow that matches on <code>reg0[14]</code> register - bit for the traffic received from HW VTEP (ramp) ports. This traffic - is passed to ingress table ls_in_l2_lkup. + If logical switch has attached logical switch port of <var>vtep</var> + type, then a priority-1000 flow that matches on + <code>reg0[14]</code> register bit for the traffic received from HW + VTEP (ramp) ports. This traffic is passed to ingress table + ls_in_l2_lkup. </li> <li> A priority-1 flow that hairpins traffic matched by non-default diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 2c4129bf3..5021b45f8 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -2961,7 +2961,6 @@ AT_CHECK([ovn-sbctl lflow-list sw0 | grep ls_in_nat_hairpin | sort | sed 's/tabl AT_CHECK([ovn-sbctl lflow-list sw0 | grep ls_in_hairpin | sort | sed 's/table=../table=??/g'], [0], [dnl table=??(ls_in_hairpin ), priority=0 , match=(1), action=(next;) table=??(ls_in_hairpin ), priority=1 , match=((reg0[[6]] == 1 || reg0[[12]] == 1)), action=(eth.dst <-> eth.src; outport = inport; flags.loopback = 1; output;) - table=??(ls_in_hairpin ), priority=1000 , match=(reg0[[14]] == 1), action=(next(pipeline=ingress, table=??);) ]) check ovn-nbctl -- ls-lb-del sw0 lb0 @@ -2977,7 +2976,6 @@ AT_CHECK([ovn-sbctl lflow-list sw0 | grep ls_in_nat_hairpin | sort | sed 's/tabl AT_CHECK([ovn-sbctl lflow-list sw0 | grep ls_in_hairpin | sort | sed 's/table=../table=??/g'], [0], [dnl table=??(ls_in_hairpin ), priority=0 , match=(1), action=(next;) - table=??(ls_in_hairpin ), priority=1000 , match=(reg0[[14]] == 1), action=(next(pipeline=ingress, table=??);) ]) check ovn-nbctl -- add load_balancer_group $lbg load_balancer $lb0 @@ -2998,7 +2996,6 @@ AT_CHECK([ovn-sbctl lflow-list sw0 | grep ls_in_nat_hairpin | sort | sed 's/tabl AT_CHECK([ovn-sbctl lflow-list sw0 | grep ls_in_hairpin | sort | sed 's/table=../table=??/g'], [0], [dnl table=??(ls_in_hairpin ), priority=0 , match=(1), action=(next;) table=??(ls_in_hairpin ), priority=1 , match=((reg0[[6]] == 1 || reg0[[12]] == 1)), action=(eth.dst <-> eth.src; outport = inport; flags.loopback = 1; output;) - table=??(ls_in_hairpin ), priority=1000 , match=(reg0[[14]] == 1), action=(next(pipeline=ingress, table=??);) ]) AT_CLEANUP -- 2.36.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
