Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dpif: Clean up netdev_ports map on dpif_close().
Commit 32b77c3("dpif: Save added ports in a port map.") introduced tracking of all dpif ports by taking a reference on each available netdev when the dpif is opened, but it failed to clear out and release references to these netdevs when the dpif is closed. One of the problems introduced by this was that upon clean exit of ovs-vswitchd via "ovs-appctl exit --cleanup", the "ovs-netdev" device was not deleted. This which could cause problems in subsequent start up. Commit 5119e25 ("dpif: Fix cleanup of userspace datapath.") fixed this particular problem by not adding such devices to the netdev_ports map, but the referencing/unreferencing upon dpif_open()/dpif_close() is still not balanced. Balance the referencing of netdevs by clearing these during dpif_close(). Fixes: 32b77c3("dpif: Save added ports in a port map.") Signed-off-by: Joe Stringer <[email protected]> Acked-by: Andy Zhou <[email protected]>
- Loading branch information