diff mbox series

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

Message ID 20200918150756.3414-4-anton.ivanov@cambridgegreys.com
State Superseded
Headers show
Series [ovs-dev,v2,01/14] ovn-northd: add marker for ovn-northd changes | expand

Commit Message

Anton Ivanov Sept. 18, 2020, 3:07 p.m. UTC
From: Anton Ivanov <anton.ivanov@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@cambridgegreys.com>
---
 northd/ovn-northd.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

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);
     }