[ovs-dev] [PATCH V3 2/2] dpif: Fix cleanup of netdev_ports map

Joe Stringer joe at ovn.org
Wed Aug 16 22:13:08 UTC 2017


On 16 August 2017 at 05:12, Roi Dayan <roid at mellanox.com> wrote:
> Executing dpctl commands from userspace also calls to
> dpif_open()/dpif_close() but not really creating another dpif
> but using a clone.
> As for netdev_ports map is global we avoid adding duplicate entries
> but also need to make sure we are not removing needed entries.
> With this commit we make sure only the last dpif close should clean
> the netdev_ports map.
>
> Fixes: 6595cb95a4a9 ("dpif: Clean up netdev_ports map on dpif_close().")
> Signed-off-by: Roi Dayan <roid at mellanox.com>
> Reviewed-by: Paul Blakey <paulb at mellanox.com>
> ---

Thanks Roi.

Usually we apply the test that shows the failure after we apply the
fix, so that the breakage isn't introduced anywhere on the tree - so
the patches would be rearranged.

Can we also roll in the following style incremental?

diff --git a/lib/dpif.c b/lib/dpif.c
index 121a26db0c37..0c8b91b68b24 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -428,8 +428,8 @@ dpif_create_and_open(const char *name, const char
*type, struct dpif **dpifp)
    return error;
}

-static
-void dpif_remove_netdev_ports(struct dpif *dpif) {
+static void
+dpif_remove_netdev_ports(struct dpif *dpif) {
        struct dpif_port_dump port_dump;
        struct dpif_port dpif_port;


More information about the dev mailing list