This redefines the ovn_lflow_add_default_drop() macro to be nearly
identical to ovn_lflow_add(), except that it fills in a constant
priority, match, and action.

Signed-off-by: Mark Michelson <[email protected]>
---
 northd/lflow-mgr.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/northd/lflow-mgr.h b/northd/lflow-mgr.h
index 8667e8a5d..5fc739336 100644
--- a/northd/lflow-mgr.h
+++ b/northd/lflow-mgr.h
@@ -140,12 +140,6 @@ void lflow_table_add_lflow(struct lflow_table *, const 
struct ovn_datapath *,
                           PRIORITY, MATCH, ACTIONS, NULL, NULL, STAGE_HINT, \
                           OVS_SOURCE_LOCATOR, NULL, LFLOW_REF)
 
-#define ovn_lflow_add_default_drop(LFLOW_TABLE, OD, STAGE, LFLOW_REF)   \
-    lflow_table_add_lflow(LFLOW_TABLE, OD, NULL, 0, STAGE, 0, "1", \
-                          debug_drop_action(), NULL, NULL, NULL,  \
-                          OVS_SOURCE_LOCATOR, NULL, LFLOW_REF)
-
-
 /* This macro is similar to ovn_lflow_add_with_hint, except that it requires
  * the IN_OUT_PORT argument, which tells the lport name that appears in the
  * MATCH, which helps ovn-controller to bypass lflows parsing when the lport is
@@ -163,6 +157,15 @@ void lflow_table_add_lflow(struct lflow_table *, const 
struct ovn_datapath *,
                           ACTIONS, IN_OUT_PORT, NULL, STAGE_HINT, \
                           OVS_SOURCE_LOCATOR, NULL, LFLOW_REF)
 
+/* Adds a row with the specified contents to the Logical_Flow table. */
+#define ovn_lflow_add_default_drop(LFLOW_TABLE, OD, STAGE, LFLOW_REF, ...) \
+    lflow_table_add_lflow__( \
+        LFLOW_TABLE_ADD_ARGS_START(LFLOW_TABLE, OD, STAGE, 0, "1", \
+                                   debug_drop_action(), LFLOW_REF) \
+        __VA_ARGS__ \
+        LFLOW_TABLE_ADD_ARGS_END \
+    )
+
 #define ovn_lflow_add(LFLOW_TABLE, OD, STAGE, PRIORITY, MATCH, ACTIONS, \
                       LFLOW_REF, ...) \
     lflow_table_add_lflow__( \
-- 
2.51.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to