diff mbox

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

Message ID CAPWQB7F2HhgQk5WCzGdO9u0Rq7qhWmVBwoG5VgrqQSjNCNNaQQ@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Joe Stringer Aug. 16, 2017, 10:13 p.m. UTC
On 16 August 2017 at 05:12, Roi Dayan <roid@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@mellanox.com>
> Reviewed-by: Paul Blakey <paulb@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 mbox

Patch

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;