On 12/2/20 8:23 AM, Eli Britstein wrote: > When a port is deleted, flow deletion requests are posted, and the netdev > is removed from offload netdevs map. Following flow deletion handling may > be done after the netdev has already been removed from the offload > netdevs map, so the HW rule is not removed and the data object is not > freed (memory leak). Flush offload rules upon port deletion to fix it. > > Signed-off-by: Eli Britstein <[email protected]> > Reviewed-by: Gaetan Rivet <[email protected]> > --- > lib/dpif-netdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 300861ca5..3645479ad 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-netdev.c > @@ -2281,6 +2281,7 @@ static void > do_del_port(struct dp_netdev *dp, struct dp_netdev_port *port) > OVS_REQUIRES(dp->port_mutex) > { > + netdev_flow_flush(port->netdev);
But offload thread is up and running at this point and could have full queue of offloading requests for this port or already sleeping on port_mutex waiting to offload some flow. So, we're leaking memory anyway. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
