> On 7/31/25 10:52 PM, Lorenzo Bianconi wrote:
> > This patch handles the logical switch creation incrementally
> > in the northd engine node.  The dependent engine nodes - ls_stateful,
> > lflow and few others still fall back to full recompute, which
> > will be handled in separate patches.
> > 
> > Reported-at: https://issues.redhat.com/browse/FDP-754
> > Co-authored-by: Numan Siddique <num...@ovn.org>
> > Signed-off-by: Numan Siddique <num...@ovn.org>
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com>
> > ---
> 
> Hi Lorenzo,
> 
> Here's one more issue I found while testing this on top of current main:

Hi Dumitru,

thx for the review.

> 
> >  
> > +static void
> > +destroy_tracked_dps(struct tracked_dps *trk_dps)
> > +{
> > +    hmapx_clear(&trk_dps->crupdated);
> > +
> > +    struct hmapx_node *n;
> > +    HMAPX_FOR_EACH (n, &trk_dps->deleted) {
> > +        free(n->data);
> 
> We leak memory here.  n->data is of type 'struct ovn_datapath *'.  We
> need to call ovn_datapath_destroy() instead.  However, that's trickier
> because we already removed the element from 'ls_datapaths.datapaths' so
> we need to something like:
> 
> Change the ovn_datapath_destroy() function to not do hmap removal
> (expect the record to not be in any map).  And change
> ovn_datapaths_destroy() to:
> 
> static void
> ovn_datapaths_destroy(struct ovn_datapaths *datapaths)
> {
>     struct ovn_datapath *dp;
>     HMAP_FOR_EACH_POP (dp, key_node, &datapaths->datapaths) {
>         ovn_datapath_destroy(dp);
>     }
>     hmap_destroy(&datapaths->datapaths);
> 
>     bitmap_free(datapaths->dps_index_map.map);
>     vector_destroy(&datapaths->dps);
> }

ack, I will fix it in v5.

Regards,
Lorenzo

> 
> > +    }
> > +    hmapx_clear(&trk_dps->deleted);
> > +}
> > +
> 
> Regards,
> Dumitru
> 
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to