diff mbox series

[ovs-dev,02/14] ovn-northd: move pre-acl and acl processing to a separate function

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

Commit Message

Anton Ivanov Sept. 14, 2020, 9:03 a.m. UTC
From: Anton Ivanov <anton.ivanov@cambridgegreys.com>

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
---
 northd/ovn-northd.c | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)

Comments

0-day Robot Sept. 14, 2020, 10:02 a.m. UTC | #1
Bleep bloop.  Greetings Anton Ivanov, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
error: sha1 information is lacking or useless (northd/ovn-northd.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 ovn-northd: move pre-acl and acl processing to a separate function
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 1fe970d1d..94b9e2906 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -6601,6 +6601,13 @@  build_drop_arp_nd_flows_for_unbound_router_ports(struct ovn_port *op,
     ds_destroy(&match);
 }
 
+/* Build pre-ACL and ACL tables for both ingress and egress.
+ * Ingress tables 3 through 10.  Egress tables 0 through 7. */
+static void
+build_lswitch_flows_pre_acl_and_acl_od(struct ovn_datapath *od,
+                    struct hmap *lflows, struct hmap *port_groups,
+                    struct shash *meter_groups, struct hmap *lbs);
+
 /*
 * Do not remove this comment - it is here as a marker to
 * make diffs readable.
@@ -6619,21 +6626,10 @@  build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
     struct ds match = DS_EMPTY_INITIALIZER;
     struct ds actions = DS_EMPTY_INITIALIZER;
 
-    /* Build pre-ACL and ACL tables for both ingress and egress.
-     * Ingress tables 3 through 10.  Egress tables 0 through 7. */
     struct ovn_datapath *od;
     HMAP_FOR_EACH (od, key_node, datapaths) {
-        if (!od->nbs) {
-            continue;
-        }
-
-        build_pre_acls(od, lflows);
-        build_pre_lb(od, lflows, meter_groups, lbs);
-        build_pre_stateful(od, lflows);
-        build_acls(od, lflows, port_groups);
-        build_qos(od, lflows);
-        build_lb(od, lflows);
-        build_stateful(od, lflows, lbs);
+        build_lswitch_flows_pre_acl_and_acl_od(od, lflows,
+                    port_groups, meter_groups, lbs);
     }
 
     /* Build logical flows for the forwarding groups */
@@ -6641,7 +6637,6 @@  build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
         if (!od->nbs || !od->nbs->n_forwarding_groups) {
             continue;
         }
-
         build_fwd_group_lflows(od, lflows);
     }
 
@@ -7311,6 +7306,22 @@  build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
     ds_destroy(&actions);
 }
 
+static void
+build_lswitch_flows_pre_acl_and_acl_od(struct ovn_datapath *od,
+                    struct hmap *lflows, struct hmap *port_groups,
+                    struct shash *meter_groups, struct hmap *lbs)
+{
+    if (od->nbs) {
+        build_pre_acls(od, lflows);
+        build_pre_lb(od, lflows, meter_groups, lbs);
+        build_pre_stateful(od, lflows);
+        build_acls(od, lflows, port_groups);
+        build_qos(od, lflows);
+        build_lb(od, lflows);
+        build_stateful(od, lflows, lbs);
+    }
+}
+
 /* Returns a string of the IP address of the router port 'op' that
  * overlaps with 'ip_s".  If one is not found, returns NULL.
  *