On Fri, Jan 9, 2026 at 9:17 PM Mark Michelson via dev < [email protected]> wrote:
> The lflow_table_add_lflow() function takes 13 arguments. Many helper > macros exist to facilitate filling in those 13 arguments without having > to spell them all out every time. Unfortunately, the amount of different > macros has gotten a bit out of hand. Some macros, like > ovn_lflow_add_with_hint__() have misleading names. Some macros, like > ovn_lflow_add_drop_with_lport_hint_and_desc() have horribly unwieldy > names. Trying to add a new macro to the list is a minefield since you > need to cherry-pick exactly which arguments the new macro should require > and which ones the macro should fill in automatically. > > This series seeks to simplify things by getting rid of all helper macros > except for ovn_lflow_add(). We accomplish this by using the VFUNC() > macro to create different versions of ovn_lflow_add() that take > different numbers of arguments. All invocations of ovn_lflow_add() > require a minimum of 7 arguments: > * lflow table > * ovn_datapath > * stage > * priority > * match > * actions > * lflow_ref > > Additional fields can be specified by adding an 8th, 9th, or 10th > argument using a series of helper macros to add specific field types. > The idea behind this is that any argument beyond the 7th can be any of > the available fields. This gives the flexibility to add lflows in any > number of combinations without having to define hyper-specific macros > for lflow addition. > > Mark Michelson (9): > lflow-mgr: Use struct argument for lflow addition. > lflows: Create new ovn_lflow_add_default_drop(). > lflows: Remove ovn_lflow_add_with_hint(). > lflows: Remove ovn_lflow_add_with_lport_and_hint(). > lflows: Remove ovn_lflow_metered() and ovn_lflow_add_with_hint__(). > lflows: Remove ovn_lflow_add_with_dp_group(). > lflows: Remove ovn_lflow_add_drop_with_desc(). > lflows: Remove ovn_lflow_add_drop_with_lport_hint_and_desc(). > lflows: Make non-struct version of lflow_table_add_lflow() private. > > northd/lflow-mgr.c | 47 +- > northd/lflow-mgr.h | 117 ++-- > northd/northd.c | 1568 +++++++++++++++++++------------------------- > 3 files changed, 772 insertions(+), 960 deletions(-) > > -- > 2.51.1 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > Hi Mark, thank you for the v3, this needs a rebase, I think we should wait with the rebase once the lflow refactor is in as those two probably have some conflicts. Other than that: Acked-by: Ales Musil <[email protected]> Regards, Ales _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
