From 89a5bef09a49f14d2ebec81f3d04815234245006 Mon Sep 17 00:00:00 2001 From: Keith Wiles Date: Mon, 6 Feb 2017 13:40:37 -0600 Subject: [PATCH] net/tap: move link down before close Fixes: f457b472b1f2 ("net/tap: add link up and down operations") Signed-off-by: Keith Wiles Acked-by: Pascal Mazon --- drivers/net/tap/rte_eth_tap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index cf80abc729..d1149ffe9b 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -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 -- 2.20.1