On Fri, Jun 2, 2023 at 7:39 AM Numan Siddique <[email protected]> wrote:
>
> On Fri, Jun 2, 2023 at 12:12 AM Han Zhou <[email protected]> wrote:
> >
> > bfd_connections isn't related to the I-P engine node "northd". So move
> > it from the northd_data to a local variable of en_lflow_run().
> >
> > Signed-off-by: Han Zhou <[email protected]>
> > Reviewed-by: Ales Musil <[email protected]>
>
> Acked-by: Numan Siddique <[email protected]>
>
> Numan
>
Thanks Numan. I applied to main.

Han

> > ---
> >  northd/en-lflow.c | 9 ++++++---
> >  northd/northd.c   | 2 --
> >  northd/northd.h   | 1 -
> >  3 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/northd/en-lflow.c b/northd/en-lflow.c
> > index c1951c8c8c20..bed7bb001e20 100644
> > --- a/northd/en-lflow.c
> > +++ b/northd/en-lflow.c
> > @@ -38,6 +38,8 @@ void en_lflow_run(struct engine_node *node, void
*data OVS_UNUSED)
> >
> >      struct northd_data *northd_data = engine_get_input_data("northd",
node);
> >
> > +    struct hmap bfd_connections = HMAP_INITIALIZER(&bfd_connections);
> > +
> >      lflow_input.nbrec_bfd_table =
> >          EN_OVSDB_GET(engine_get_input("NB_bfd", node));
> >      lflow_input.sbrec_bfd_table =
> > @@ -61,7 +63,7 @@ void en_lflow_run(struct engine_node *node, void
*data OVS_UNUSED)
> >      lflow_input.port_groups = &northd_data->port_groups;
> >      lflow_input.meter_groups = &northd_data->meter_groups;
> >      lflow_input.lbs = &northd_data->lbs;
> > -    lflow_input.bfd_connections = &northd_data->bfd_connections;
> > +    lflow_input.bfd_connections = &bfd_connections;
> >      lflow_input.features = &northd_data->features;
> >      lflow_input.ovn_internal_version_changed =
> >                        northd_data->ovn_internal_version_changed;
> > @@ -70,11 +72,12 @@ void en_lflow_run(struct engine_node *node, void
*data OVS_UNUSED)
> >      build_bfd_table(eng_ctx->ovnsb_idl_txn,
> >                      lflow_input.nbrec_bfd_table,
> >                      lflow_input.sbrec_bfd_table,
> > -                    &northd_data->bfd_connections,
> > +                    &bfd_connections,
> >                      &northd_data->lr_ports);
> >      build_lflows(&lflow_input, eng_ctx->ovnsb_idl_txn);
> >      bfd_cleanup_connections(lflow_input.nbrec_bfd_table,
> > -                            &northd_data->bfd_connections);
> > +                            &bfd_connections);
> > +    hmap_destroy(&bfd_connections);
> >      stopwatch_stop(BUILD_LFLOWS_STOPWATCH_NAME, time_msec());
> >
> >      engine_set_node_state(node, EN_UPDATED);
> > diff --git a/northd/northd.c b/northd/northd.c
> > index 7123ab3a5afb..277f4780bd20 100644
> > --- a/northd/northd.c
> > +++ b/northd/northd.c
> > @@ -16480,7 +16480,6 @@ northd_init(struct northd_data *data)
> >      shash_init(&data->meter_groups);
> >      hmap_init(&data->lbs);
> >      hmap_init(&data->lb_groups);
> > -    hmap_init(&data->bfd_connections);
> >      ovs_list_init(&data->lr_list);
> >      data->features = (struct chassis_features) {
> >          .ct_no_masked_label = true,
> > @@ -16511,7 +16510,6 @@ northd_destroy(struct northd_data *data)
> >      }
> >
> >      hmap_destroy(&data->port_groups);
> > -    hmap_destroy(&data->bfd_connections);
> >
> >      struct shash_node *node;
> >      SHASH_FOR_EACH_SAFE (node, &data->meter_groups) {
> > diff --git a/northd/northd.h b/northd/northd.h
> > index ad6ccef5e366..f073ceb6d9c2 100644
> > --- a/northd/northd.h
> > +++ b/northd/northd.h
> > @@ -94,7 +94,6 @@ struct northd_data {
> >      struct shash meter_groups;
> >      struct hmap lbs;
> >      struct hmap lb_groups;
> > -    struct hmap bfd_connections;
> >      struct ovs_list lr_list;
> >      bool ovn_internal_version_changed;
> >      struct chassis_features features;
> > --
> > 2.30.2
> >
> > _______________________________________________
> > dev mailing list
> > [email protected]
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to