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 <el...@nvidia.com> Reviewed-by: Gaetan Rivet <gaet...@nvidia.com> --- 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); hmap_remove(&dp->ports, &port->node); seq_change(dp->port_seq); -- 2.28.0.546.g385c171 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev