DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gaetan Rivet <gaetan.rivet@6wind.com>
To: dev@dpdk.org
Cc: Jan Blunck <jblunck@infradead.org>
Subject: [dpdk-dev] [PATCH v5 12/12] event: use generic vdev for probe and remove
Date: Tue, 11 Apr 2017 17:44:16 +0200	[thread overview]
Message-ID: <e546af0c4954ed19a65caaa9ece4dd7b2994ae8f.1491925092.git.gaetan.rivet@6wind.com> (raw)
In-Reply-To: <cover.1491925092.git.gaetan.rivet@6wind.com>
In-Reply-To: <cover.1491925092.git.gaetan.rivet@6wind.com>

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/event/octeontx/ssovf_evdev.c       | 11 +++++++----
 drivers/event/skeleton/skeleton_eventdev.c | 10 ++++++++--
 drivers/event/sw/sw_evdev.c                | 11 +++++++++--
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 6479c80..c80a443 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -488,17 +488,17 @@ static const struct rte_eventdev_ops ssovf_ops = {
 };
 
 static int
-ssovf_vdev_probe(const char *name, const char *params)
+ssovf_vdev_probe(struct rte_vdev_device *vdev)
 {
 	struct octeontx_ssovf_info oinfo;
 	struct ssovf_mbox_dev_info info;
 	struct ssovf_evdev *edev;
 	struct rte_eventdev *eventdev;
 	static int ssovf_init_once;
+	const char *name;
 	int ret;
 
-	RTE_SET_USED(params);
-
+	name = rte_vdev_device_name(vdev);
 	/* More than one instance is not supported */
 	if (ssovf_init_once) {
 		ssovf_log_err("Request to create >1 %s instance", name);
@@ -563,8 +563,11 @@ ssovf_vdev_probe(const char *name, const char *params)
 }
 
 static int
-ssovf_vdev_remove(const char *name)
+ssovf_vdev_remove(struct rte_vdev_device *vdev)
 {
+	const char *name;
+
+	name = rte_vdev_device_name(vdev);
 	ssovf_log_info("Closing %s", name);
 	return rte_event_pmd_vdev_uninit(name);
 }
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index d2da7d8..800bd76 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -468,16 +468,22 @@ skeleton_eventdev_create(const char *name, int socket_id)
 }
 
 static int
-skeleton_eventdev_probe(const char *name, __rte_unused const char *input_args)
+skeleton_eventdev_probe(struct rte_vdev_device *vdev)
 {
+	const char *name;
+
+	name = rte_vdev_device_name(vdev);
 	RTE_LOG(INFO, PMD, "Initializing %s on NUMA node %d\n", name,
 			rte_socket_id());
 	return skeleton_eventdev_create(name, rte_socket_id());
 }
 
 static int
-skeleton_eventdev_remove(const char *name)
+skeleton_eventdev_remove(struct rte_vdev_device *vdev)
 {
+	const char *name;
+
+	name = rte_vdev_device_name(vdev);
 	PMD_DRV_LOG(INFO, "Closing %s on NUMA node %d", name, rte_socket_id());
 
 	return rte_event_pmd_vdev_uninit(name);
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 0caf8ba..a31aaa6 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -696,7 +696,7 @@ set_credit_quanta(const char *key __rte_unused, const char *value, void *opaque)
 }
 
 static int
-sw_probe(const char *name, const char *params)
+sw_probe(struct rte_vdev_device *vdev)
 {
 	static const struct rte_eventdev_ops evdev_sw_ops = {
 			.dev_configure = sw_dev_configure,
@@ -727,12 +727,16 @@ sw_probe(const char *name, const char *params)
 		CREDIT_QUANTA_ARG,
 		NULL
 	};
+	const char *name;
+	const char *params;
 	struct rte_eventdev *dev;
 	struct sw_evdev *sw;
 	int socket_id = rte_socket_id();
 	int sched_quanta  = SW_DEFAULT_SCHED_QUANTA;
 	int credit_quanta = SW_DEFAULT_CREDIT_QUANTA;
 
+	name = rte_vdev_device_name(vdev);
+	params = rte_vdev_device_args(vdev);
 	if (params != NULL && params[0] != '\0') {
 		struct rte_kvargs *kvlist = rte_kvargs_parse(params, args);
 
@@ -806,8 +810,11 @@ sw_probe(const char *name, const char *params)
 }
 
 static int
-sw_remove(const char *name)
+sw_remove(struct rte_vdev_device *vdev)
 {
+	const char *name;
+
+	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-- 
2.1.4

  parent reply	other threads:[~2017-04-11 15:44 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 10:02 [dpdk-dev] [PATCH 0/7] Rework vdev probing to use rte_bus infrastructure Jan Blunck
2017-02-15 10:02 ` [dpdk-dev] [PATCH 1/7] eal: use different constructor priorities for initcalls Jan Blunck
2017-02-15 14:37   ` Shreyansh Jain
2017-02-15 15:05     ` Jan Blunck
2017-02-16  5:59       ` Shreyansh Jain
2017-02-15 10:02 ` [dpdk-dev] [PATCH 2/7] eal: probe legacy PCI devices before other bus devices Jan Blunck
2017-02-15 14:03   ` Shreyansh Jain
2017-02-15 10:02 ` [dpdk-dev] [PATCH 3/7] eal: move virtual device probing into a bus Jan Blunck
2017-02-15 14:11   ` Shreyansh Jain
2017-02-15 14:13     ` Jan Blunck
2017-02-15 14:20       ` Shreyansh Jain
2017-02-15 14:15     ` Shreyansh Jain
2017-02-15 14:22       ` Wiles, Keith
2017-02-15 14:27         ` Shreyansh Jain
2017-02-15 17:25           ` Jerin Jacob
2017-02-15 18:09             ` Wiles, Keith
2017-02-15 20:06               ` Jan Blunck
2017-02-15 21:56                 ` Wiles, Keith
2017-02-15 17:06         ` Jan Blunck
2017-02-15 17:10           ` Wiles, Keith
2017-02-15 17:22             ` Wiles, Keith
2017-02-15 10:02 ` [dpdk-dev] [PATCH 4/7] eal: remove unused rte_eal_dev_init() Jan Blunck
2017-02-15 17:11   ` Ferruh Yigit
2017-02-15 10:02 ` [dpdk-dev] [PATCH 5/7] eal: Refactor vdev driver probe/remove Jan Blunck
2017-02-15 10:02 ` [dpdk-dev] [PATCH 6/7] eal: add struct rte_vdev_device Jan Blunck
2017-02-15 17:11   ` Ferruh Yigit
2017-02-16 15:55     ` Jan Blunck
2017-02-15 10:02 ` [dpdk-dev] [PATCH 7/7] eal: make virtual bus use rte_vdev_device Jan Blunck
2017-02-15 17:11   ` Ferruh Yigit
2017-02-15 17:11 ` [dpdk-dev] [PATCH 0/7] Rework vdev probing to use rte_bus infrastructure Ferruh Yigit
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 0/8] " Jan Blunck
2017-02-21  6:44   ` Shreyansh Jain
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 00/10] " Jan Blunck
2017-02-27 13:09     ` Jan Blunck
2017-02-28  8:48       ` Shreyansh Jain
2017-02-28  9:19         ` Jan Blunck
2017-02-28  9:28           ` Shreyansh Jain
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 " Jan Blunck
2017-03-13 17:55       ` Thomas Monjalon
2017-03-27  7:47         ` Jan Blunck
2017-04-11 15:44       ` [dpdk-dev] [PATCH v5 00/12] " Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 01/12] eal: probe new virtual bus after other bus devices Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 02/12] eal: move virtual device probing into a bus Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 03/12] eal: remove unused rte_eal_dev_init() Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 04/12] eal: Refactor vdev driver probe/remove Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 05/12] eal: add struct rte_vdev_device Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 06/12] eal: add virtual device name helper function Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 07/12] eal: add virtual device arguments " Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 08/12] eal: make virtual bus use rte_vdev_device Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 09/12] eal: make virtual driver probe and remove take rte_vdev_device Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 10/12] net/kni: use generic vdev for probe and remove Gaetan Rivet
2017-04-11 15:44         ` [dpdk-dev] [PATCH v5 11/12] crypto: " Gaetan Rivet
2017-04-11 15:44         ` Gaetan Rivet [this message]
2017-04-14 12:21         ` [dpdk-dev] [PATCH v5 00/12] Rework vdev probing to use rte_bus infrastructure Thomas Monjalon
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 01/10] eal: probe legacy PCI devices before other bus devices Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 02/10] eal: probe new virtual bus after " Jan Blunck
2017-03-13 17:42       ` Thomas Monjalon
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 03/10] eal: move virtual device probing into a bus Jan Blunck
2017-03-13 17:44       ` Thomas Monjalon
2017-03-27  7:46         ` Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 04/10] eal: remove unused rte_eal_dev_init() Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 05/10] eal: Refactor vdev driver probe/remove Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 06/10] eal: add struct rte_vdev_device Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 07/10] eal: add virtual device name helper function Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 08/10] eal: add virtual device arguments " Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 09/10] eal: make virtual bus use rte_vdev_device Jan Blunck
2017-03-13 17:51       ` Thomas Monjalon
2017-03-27  7:43         ` Jan Blunck
2017-03-06 10:56     ` [dpdk-dev] [PATCH v4 10/10] eal: make virtual driver probe and remove take rte_vdev_device Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 01/10] eal: probe legacy PCI devices before other bus devices Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 02/10] eal: probe new virtual bus after " Jan Blunck
2017-02-27  8:59     ` Shreyansh Jain
2017-02-27  9:09       ` Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 03/10] eal: move virtual device probing into a bus Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 04/10] eal: remove unused rte_eal_dev_init() Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 05/10] eal: Refactor vdev driver probe/remove Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 06/10] eal: add struct rte_vdev_device Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 07/10] eal: add virtual device name helper function Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 08/10] eal: add virtual device arguments " Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 09/10] eal: make virtual bus use rte_vdev_device Jan Blunck
2017-02-25 10:28   ` [dpdk-dev] [PATCH v3 10/10] eal: make virtual driver probe and remove take rte_vdev_device Jan Blunck
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 1/8] eal: use different constructor priorities for initcalls Jan Blunck
2017-02-21 12:30   ` Ferruh Yigit
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 2/8] eal: probe legacy PCI devices before other bus devices Jan Blunck
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 3/8] eal: move virtual device probing into a bus Jan Blunck
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 4/8] eal: remove unused rte_eal_dev_init() Jan Blunck
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 5/8] eal: Refactor vdev driver probe/remove Jan Blunck
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 6/8] eal: add struct rte_vdev_device Jan Blunck
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 7/8] eal: add virtual device name helper function Jan Blunck
2017-02-21 12:25   ` Ferruh Yigit
2017-02-20 14:17 ` [dpdk-dev] [PATCH v2 8/8] eal: make virtual bus use rte_vdev_device Jan Blunck

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=e546af0c4954ed19a65caaa9ece4dd7b2994ae8f.1491925092.git.gaetan.rivet@6wind.com \
    --to=gaetan.rivet@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jblunck@infradead.org \
    /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).