DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Matan Azrad <matan@mellanox.com>
Subject: [dpdk-dev] [PATCH v3 3/5] ethdev: free detached port by the dedicated function
Date: Fri, 29 Dec 2017 14:36:56 +0100	[thread overview]
Message-ID: <20171229133658.31258-4-thomas@monjalon.net> (raw)
In-Reply-To: <20171229133658.31258-1-thomas@monjalon.net>

From: Matan Azrad <matan@mellanox.com>

In the port detach function, use the function to free an ethdev port
instead of changing its state directly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: no change
v3: no change
---
 lib/librte_ether/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 5323d445d..f40627fa3 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -436,7 +436,7 @@ rte_eth_dev_detach(uint16_t port_id, char *name)
 	if (ret < 0)
 		goto err;
 
-	rte_eth_devices[port_id].state = RTE_ETH_DEV_UNUSED;
+	rte_eth_dev_release_port(&rte_eth_devices[port_id]);
 	return 0;
 
 err:
-- 
2.15.1

  parent reply	other threads:[~2017-12-29 13:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 22:13 [dpdk-dev] [PATCH] ethdev: add notifications for probing and removal Thomas Monjalon
2017-12-22  3:17 ` Ferruh Yigit
2017-12-22  8:39   ` Thomas Monjalon
2017-12-29 13:12 ` [dpdk-dev] [PATCH v2 0/3] ethdev port notifications Thomas Monjalon
2017-12-29 13:12   ` [dpdk-dev] [PATCH v2 1/3] ethdev: allow event registration for all ports Thomas Monjalon
2017-12-29 13:12   ` [dpdk-dev] [PATCH v2 2/3] ethdev: free detached port by the dedicated function Thomas Monjalon
2017-12-29 13:12   ` [dpdk-dev] [PATCH v2 3/3] ethdev: add notifications for probing and removal Thomas Monjalon
2017-12-29 13:36 ` [dpdk-dev] [PATCH v3 0/5] ethdev port notifications Thomas Monjalon
2017-12-29 13:36   ` [dpdk-dev] [PATCH v3 1/5] ethdev: remove useless parameter in callback process Thomas Monjalon
2018-01-02 11:35     ` Iremonger, Bernard
2018-01-02 12:21       ` Neil Horman
2018-01-03  8:17         ` Thomas Monjalon
2017-12-29 13:36   ` [dpdk-dev] [PATCH v3 2/5] ethdev: allow event registration for all ports Thomas Monjalon
2017-12-29 13:36   ` Thomas Monjalon [this message]
2017-12-29 13:36   ` [dpdk-dev] [PATCH v3 4/5] ethdev: add notifications for probing and removal Thomas Monjalon
2017-12-29 13:36   ` [dpdk-dev] [PATCH v3 5/5] app/testpmd: extend event printing Thomas Monjalon
2018-01-04 16:01 ` [dpdk-dev] [PATCH v4 0/5] ethdev port notifications Thomas Monjalon
2018-01-04 16:01   ` [dpdk-dev] [PATCH v4 1/5] ethdev: remove useless parameter in callback process Thomas Monjalon
2018-01-04 16:01   ` [dpdk-dev] [PATCH v4 2/5] ethdev: allow event registration for all ports Thomas Monjalon
2018-01-04 16:01   ` [dpdk-dev] [PATCH v4 3/5] ethdev: free detached port by the dedicated function Thomas Monjalon
2018-01-04 16:01   ` [dpdk-dev] [PATCH v4 4/5] ethdev: add notifications for probing and removal Thomas Monjalon
2018-01-04 16:01   ` [dpdk-dev] [PATCH v4 5/5] app/testpmd: extend event printing Thomas Monjalon
2018-01-04 16:03     ` Thomas Monjalon
2018-01-10 21:02     ` Ferruh Yigit
2018-01-10 21:19   ` [dpdk-dev] [PATCH v4 0/5] ethdev port notifications 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=20171229133658.31258-4-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=matan@mellanox.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).