On Tue, Dec 29, 2020 at 2:17 AM Eli Britstein <[email protected]> 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, and disable > pending handling of offloads to fix it. > > Signed-off-by: Eli Britstein <[email protected]> > Reviewed-by: Gaetan Rivet <[email protected]> > --- > lib/dpif-netdev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 300861ca5..3f0639fca 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-netdev.c > @@ -2281,6 +2281,8 @@ static void > do_del_port(struct dp_netdev *dp, struct dp_netdev_port *port) > OVS_REQUIRES(dp->port_mutex) > { > + netdev_flow_flush(port->netdev); > + netdev_uninit_flow_api(port->netdev); Hi Eli Why not invoke the netdev_flow_flush in netdev_ports_remove ? I posted a patch for tc offload, but not accepted yet. http://patchwork.ozlabs.org/project/openvswitch/patch/[email protected]/
> hmap_remove(&dp->ports, &port->node); > seq_change(dp->port_seq); > > -- > 2.28.0.546.g385c171 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev -- Best regards, Tonghao _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
