On Wed, Jun 11, 2025 at 8:30 PM Jacob Tanenbaum via dev <
ovs-dev@openvswitch.org> wrote:

> All the calls to lflow_table_add_lflow() that are repeated with a
> pattern are called through macros defined in lflow-mgr.h except for
> lflow_table_add_lflow_default_drop(). For some reason the macro
> ovn_lflow_add_default_drop called the function
> lflow_table_add_lflow_default_drop() which then called
> lflow_table_add_lflow(). This patch removes the function
> lflow_table_add_lflow_default_drop() and the macro
> ovn_lflow_add_default_drop now calls lflow_table_add_lflow() directly.
>
> Signed-off-by: Jacob Tanenbaum <jtane...@redhat.com>
>
> diff --git a/northd/lflow-mgr.c b/northd/lflow-mgr.c
> index 88ce7ce56..18b88cf9e 100644
> --- a/northd/lflow-mgr.c
> +++ b/northd/lflow-mgr.c
> @@ -726,18 +726,6 @@ lflow_table_add_lflow(struct lflow_table *lflow_table,
>      lflow_hash_unlock(hash_lock);
>  }
>
> -void
> -lflow_table_add_lflow_default_drop(struct lflow_table *lflow_table,
> -                                   const struct ovn_datapath *od,
> -                                   enum ovn_stage stage,
> -                                   const char *where,
> -                                   struct lflow_ref *lflow_ref)
> -{
> -    lflow_table_add_lflow(lflow_table, od, NULL, 0, stage, 0, "1",
> -                          debug_drop_action(), NULL, NULL, NULL,
> -                          where, NULL, lflow_ref);
> -}
> -
>  struct ovn_dp_group *
>  ovn_dp_group_get(struct hmap *dp_groups, size_t desired_n,
>                   const unsigned long *desired_bitmap,
> diff --git a/northd/lflow-mgr.h b/northd/lflow-mgr.h
> index 2c05b352d..1521270d6 100644
> --- a/northd/lflow-mgr.h
> +++ b/northd/lflow-mgr.h
> @@ -80,11 +80,6 @@ void lflow_table_add_lflow(struct lflow_table *, const
> struct ovn_datapath *,
>                             const struct ovsdb_idl_row *stage_hint,
>                             const char *where, const char *flow_desc,
>                             struct lflow_ref *);
> -void lflow_table_add_lflow_default_drop(struct lflow_table *,
> -                                        const struct ovn_datapath *,
> -                                        enum ovn_stage stage,
> -                                        const char *where,
> -                                        struct lflow_ref *);
>
>  /* Adds a row with the specified contents to the Logical_Flow table. */
>  #define ovn_lflow_add_with_hint__(LFLOW_TABLE, OD, STAGE, PRIORITY,
> MATCH, \
> @@ -108,8 +103,9 @@ void lflow_table_add_lflow_default_drop(struct
> lflow_table *,
>                            OVS_SOURCE_LOCATOR, NULL, LFLOW_REF)
>
>  #define ovn_lflow_add_default_drop(LFLOW_TABLE, OD, STAGE, LFLOW_REF)   \
> -    lflow_table_add_lflow_default_drop(LFLOW_TABLE, OD, STAGE, \
> -                                       OVS_SOURCE_LOCATOR, 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
> --
> 2.49.0
>
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Thank you Jacob,

I went ahead and applied this to main.

Regards,
Ales
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to