From: Keith Wiles <keith.wiles@intel.com>
To: dev@dpdk.org
Cc: pascal.mazon@6wind.com, ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v3 7/7] net/tap: move closing fds to pmd close from pmd stop
Date: Mon, 6 Feb 2017 13:40:38 -0600 [thread overview]
Message-ID: <20170206194038.9246-7-keith.wiles@intel.com> (raw)
In-Reply-To: <20170206194038.9246-1-keith.wiles@intel.com>
In-Reply-To: <20170202223330.39240-1-keith.wiles@intel.com>
At the same time remove closing fds code from pmd stop routine.
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
drivers/net/tap/rte_eth_tap.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 966e91a..0a7f4af 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -350,14 +350,7 @@ tap_dev_start(struct rte_eth_dev *dev)
static void
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);
}
static int
@@ -431,6 +424,17 @@ tap_stats_reset(struct rte_eth_dev *dev)
static void
tap_dev_close(struct rte_eth_dev *dev __rte_unused)
{
+ 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);
+ internals->rxq[i].fd = -1;
+ internals->txq[i].fd = -1;
+ }
}
static void
--
2.8.0.GIT
next prev parent reply other threads:[~2017-02-06 19:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 22:33 [dpdk-dev] [PATCH 1/5] nic/tap: fix tap docs for device name Keith Wiles
2017-02-02 22:33 ` [dpdk-dev] [PATCH 2/5] net/tap: fix multi-queue support Keith Wiles
2017-02-03 9:37 ` Pascal Mazon
2017-02-03 20:32 ` Wiles, Keith
2017-02-02 22:33 ` [dpdk-dev] [PATCH 3/5] net/tap: remove redundant fds array Keith Wiles
2017-02-03 9:38 ` Pascal Mazon
2017-02-02 22:33 ` [dpdk-dev] [PATCH 4/5] net/tap: fix up log message to correct channel Keith Wiles
2017-02-03 9:45 ` Pascal Mazon
2017-02-02 22:33 ` [dpdk-dev] [PATCH 5/5] net/tap: remove unused variable and minor cleanup Keith Wiles
2017-02-03 9:47 ` Pascal Mazon
2017-02-03 9:32 ` [dpdk-dev] [PATCH 1/5] nic/tap: fix tap docs for device name Pascal Mazon
2017-02-03 11:48 ` Ferruh Yigit
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 1/6] net/tap: " Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 2/6] net/tap: remove redundant fds array Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 3/6] net/tap: remove unused variable and minor cleanup Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 4/6] net/tap: fix multi-queue support Keith Wiles
2017-02-06 15:45 ` Pascal Mazon
2017-02-06 15:57 ` Wiles, Keith
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 5/6] net/tap: cleanup log messages Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 6/6] net/tap: link set down must be before close Keith Wiles
2017-02-06 15:57 ` Pascal Mazon
2017-02-06 16:03 ` Wiles, Keith
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 1/7] net/tap: fix tap docs for device name Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 2/7] net/tap: remove redundant fds array Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 3/7] net/tap: remove unused variable and minor cleanup Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 4/7] net/tap: fix multi-queue support Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 5/7] net/tap: cleanup log messages Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 6/7] net/tap: link set down must be done before close Keith Wiles
2017-02-06 19:40 ` Keith Wiles [this message]
2017-02-07 8:51 ` [dpdk-dev] [PATCH v3 7/7] net/tap: move closing fds to pmd close from pmd stop Pascal Mazon
2017-02-07 14:06 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170206194038.9246-7-keith.wiles@intel.com \
--to=keith.wiles@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=pascal.mazon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).