On Tue, Dec 16, 2025 at 7:44 PM Mark Michelson via dev <
[email protected]> wrote:

> Every caller of this function is aware of the type of datapath group
> they are creating and therefore only needs to pass a single type of
> datapaths in.
>
> Signed-off-by: Mark Michelson <[email protected]>
> ---
>  northd/en-sync-sb.c |  4 ++--
>  northd/lflow-mgr.c  | 17 ++++++-----------
>  northd/lflow-mgr.h  |  4 +---
>  3 files changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c
> index b257e8f10..8c8c5de05 100644
> --- a/northd/en-sync-sb.c
> +++ b/northd/en-sync-sb.c
> @@ -810,7 +810,7 @@ sync_sb_lb_record(struct sb_lb_record *sb_lb,
>          } else {
>              sb_lb->ls_dpg = ovn_dp_group_create(
>                  ovnsb_txn, &sb_lbs->ls_dp_groups, sbrec_ls_dp_group,
> -                &lb_dps->nb_ls_map, true, ls_datapaths, lr_datapaths);
> +                &lb_dps->nb_ls_map, ls_datapaths);
>          }
>
>          if (chassis_features->ls_dpg_column) {
> @@ -862,7 +862,7 @@ sync_sb_lb_record(struct sb_lb_record *sb_lb,
>          } else {
>              sb_lb->lr_dpg = ovn_dp_group_create(
>                  ovnsb_txn, &sb_lbs->lr_dp_groups, sbrec_lr_dp_group,
> -                &lb_dps->nb_lr_map, false, ls_datapaths, lr_datapaths);
> +                &lb_dps->nb_lr_map, lr_datapaths);
>          }
>
>          sbrec_load_balancer_set_lr_datapath_group(sbrec_lb,
> diff --git a/northd/lflow-mgr.c b/northd/lflow-mgr.c
> index f130253a9..26c807cf1 100644
> --- a/northd/lflow-mgr.c
> +++ b/northd/lflow-mgr.c
> @@ -794,9 +794,7 @@ ovn_dp_group_create(struct ovsdb_idl_txn *ovnsb_txn,
>                      struct hmap *dp_groups,
>                      struct sbrec_logical_dp_group *sb_group,
>                      const struct dynamic_bitmap *desired_bitmap,
> -                    bool is_switch,
> -                    const struct ovn_datapaths *ls_datapaths,
> -                    const struct ovn_datapaths *lr_datapaths)
> +                    const struct ovn_datapaths *datapaths)
>  {
>      struct ovn_dp_group *dpg;
>
> @@ -808,10 +806,8 @@ ovn_dp_group_create(struct ovsdb_idl_txn *ovnsb_txn,
>      for (i = 0; sb_group && i < sb_group->n_datapaths; i++) {
>          struct ovn_datapath *datapath_od;
>
> -        datapath_od = ovn_datapath_from_sbrec(
> -                        ls_datapaths ? &ls_datapaths->datapaths : NULL,
> -                        lr_datapaths ? &lr_datapaths->datapaths : NULL,
> -                        sb_group->datapaths[i]);
> +        datapath_od = ovn_datapath_from_sbrec_(&datapaths->datapaths,
> +                                               sb_group->datapaths[i]);
>          if (!datapath_od || ovn_datapath_is_stale(datapath_od)) {
>              break;
>          }
> @@ -840,8 +836,7 @@ ovn_dp_group_create(struct ovsdb_idl_txn *ovnsb_txn,
>          dpg->dp_group = ovn_sb_insert_or_update_logical_dp_group(
>                              ovnsb_txn,
>                              can_modify ? sb_group : NULL,
> -                            desired_bitmap->map,
> -                            is_switch ? ls_datapaths : lr_datapaths);
> +                            desired_bitmap->map, datapaths);
>      }
>      dpg->dpg_uuid = dpg->dp_group->header_.uuid;
>      hmap_insert(dp_groups, &dpg->node, hash_int(desired_bitmap->n_elems,
> 0));
> @@ -1209,8 +1204,8 @@ sync_lflow_to_sb(struct ovn_lflow *lflow,
>          } else {
>              lflow->dpg = ovn_dp_group_create(
>                                  ovnsb_txn, dp_groups, sbrec_dp_group,
> -                                &lflow->dpg_bitmap, is_switch,
> -                                ls_datapaths, lr_datapaths);
> +                                &lflow->dpg_bitmap,
> +                                is_switch ? ls_datapaths : lr_datapaths);
>          }
>          sbrec_logical_flow_set_logical_dp_group(sbflow,
>                                                  lflow->dpg->dp_group);
> diff --git a/northd/lflow-mgr.h b/northd/lflow-mgr.h
> index c1e72d1be..9276faeee 100644
> --- a/northd/lflow-mgr.h
> +++ b/northd/lflow-mgr.h
> @@ -182,9 +182,7 @@ struct ovn_dp_group *ovn_dp_group_create(
>      struct ovsdb_idl_txn *ovnsb_txn, struct hmap *dp_groups,
>      struct sbrec_logical_dp_group *sb_group,
>      const struct dynamic_bitmap *desired_bitmap,
> -    bool is_switch,
> -    const struct ovn_datapaths *ls_datapaths,
> -    const struct ovn_datapaths *lr_datapaths);
> +    const struct ovn_datapaths *datapaths);
>
>  static inline void
>  inc_ovn_dp_group_ref(struct ovn_dp_group *dpg)
> --
> 2.51.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <[email protected]>

It also seems like CI had some infra issues, let's try it again:
Recheck-request: github-robot-_Build_and_Test
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to