[ovs-dev] [PATCH ovn v2 03/14] ovn-northd: move condition for forwarding groups into its helper

anton.ivanov at cambridgegreys.com anton.ivanov at cambridgegreys.com
Fri Sep 18 15:07:45 UTC 2020


From: Anton Ivanov <anton.ivanov at cambridgegreys.com>

Move the condition which skips build_fwd_group_lflows into the
helper function to match calling conventions for all other
helpers.

Signed-off-by: Anton Ivanov <anton.ivanov at cambridgegreys.com>
---
 northd/ovn-northd.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index a6212f902..ecd68fff3 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -6098,6 +6098,11 @@ build_stateful(struct ovn_datapath *od, struct hmap *lflows, struct hmap *lbs)
 static void
 build_fwd_group_lflows(struct ovn_datapath *od, struct hmap *lflows)
 {
+
+    if (!od->nbs || !od->nbs->n_forwarding_groups) {
+        return;
+    }
+
     struct ds match = DS_EMPTY_INITIALIZER;
     struct ds actions = DS_EMPTY_INITIALIZER;
 
@@ -6771,10 +6776,6 @@ build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
 
     /* Build logical flows for the forwarding groups */
     HMAP_FOR_EACH (od, key_node, datapaths) {
-        if (!od->nbs || !od->nbs->n_forwarding_groups) {
-            continue;
-        }
-
         build_fwd_group_lflows(od, lflows);
     }
 
-- 
2.20.1



More information about the dev mailing list