On Wed, Apr 15, 2026 at 9:37 AM Dumitru Ceara <[email protected]> wrote:
> On 4/15/26 9:23 AM, Ales Musil wrote:
> >>>> @@ -243,6 +249,7 @@ ls_stateful_port_group_handler(struct engine_node
> >>>> *node, void *data_)
> >>>> enum engine_input_handler_result
> >>>> ls_stateful_acl_handler(struct engine_node *node, void *data_)
> >>>> {
> >>>> + struct ls_stateful_input input_data =
> >>>> ls_stateful_get_input_data(node);
> >>>> struct ed_type_ls_stateful *data = data_;
> >>>> const struct nbrec_acl_table *nbrec_acl_table =
> >>>> EN_OVSDB_GET(engine_get_input("NB_acl", node));
> >>>> @@ -259,7 +266,15 @@ ls_stateful_acl_handler(struct engine_node *node,
> >>>> void *data_)
> >>>> LS_STATEFUL_TABLE_FOR_EACH (ls_stateful_rec, &data->table) {
> >>>> if (uuidset_contains(&ls_stateful_rec->related_acls,
> >>>> &acl->header_.uuid)) {
> >>>> - hmapx_add(&data->trk_data.crupdated,
> ls_stateful_rec);
> >>>> + if (hmapx_add(&data->trk_data.crupdated,
> >>>> ls_stateful_rec)) {
> >>>> + const struct ovn_datapath *od =
> ovn_datapath_find(
> >>>> + &input_data.ls_datapaths->datapaths,
> >>>> + &ls_stateful_rec->nbs_uuid);
> >>>>
> >>> Wouldn't it be better to do "ovn_datapaths_find_by_index()"?
> >>> Also I think that at this point the od cannot be NULL,
> >>> so let's make it an assert WDYT?
> >>>
> >> Definitely, sounds good to me.
> >>
> > In that case there is no need to do v2:
> >
> > Acked-by: Ales Musil <[email protected]>
>
> I just realized we have the same slightly inefficient lookup in the
> "delete" path of ls_stateful_northd_handler().
>
> Mind if I change ovn_datapath_find() to ovn_datapaths_find_by_index()
> there too while at it?
>
Sounds good.
>
> Thanks,
> Dumitru
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev