net/tap: move link down before close
authorKeith Wiles <keith.wiles@intel.com>
Mon, 6 Feb 2017 19:40:37 +0000 (13:40 -0600)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 10 Feb 2017 11:25:49 +0000 (12:25 +0100)
Fixes: f457b472b1f2 ("net/tap: add link up and down operations")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
drivers/net/tap/rte_eth_tap.c

index cf80abc..d1149ff 100644 (file)
@@ -353,10 +353,11 @@ tap_dev_stop(struct rte_eth_dev *dev)
        int i;
        struct pmd_internals *internals = dev->data->dev_private;
 
+       tap_link_set_down(dev);
+
        for (i = 0; i < internals->nb_queues; i++)
                if (internals->rxq[i].fd != -1)
                        close(internals->rxq[i].fd);
-       tap_link_set_down(dev);
 }
 
 static int