DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jan Viktorin <viktorin@rehivetech.com>
To: dev@dpdk.org
Cc: Jan Viktorin <viktorin@rehivetech.com>
Subject: [dpdk-dev] [RFC 3/6] eal: move devargs from rte_pci_device to rte_device
Date: Mon, 18 Jan 2016 17:03:04 +0100	[thread overview]
Message-ID: <1453132987-20564-4-git-send-email-viktorin@rehivetech.com> (raw)
In-Reply-To: <1453132987-20564-1-git-send-email-viktorin@rehivetech.com>

Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
---
 lib/librte_eal/common/eal_common_pci.c  | 6 +++---
 lib/librte_eal/common/include/rte_dev.h | 3 +++
 lib/librte_eal/common/include/rte_pci.h | 1 -
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index dcfe947..60501a5 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -173,8 +173,8 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 				dev->id.device_id, dr->name);
 
 		/* no initialization when blacklisted, return without error */
-		if (dev->devargs != NULL &&
-			dev->devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) {
+		if (dev->dev.devargs != NULL &&
+			dev->dev.devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) {
 			RTE_LOG(DEBUG, EAL, "  Device is blacklisted, not initializing\n");
 			return 1;
 		}
@@ -401,7 +401,7 @@ rte_eal_pci_probe(void)
 		/* set devargs in PCI structure */
 		devargs = pci_devargs_lookup(dev);
 		if (devargs != NULL)
-			dev->devargs = devargs;
+			dev->dev.devargs = devargs;
 
 		/* probe all or only whitelisted devices */
 		if (probe_all)
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index b779705..1ab47f9 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -156,8 +156,11 @@ struct rte_bus_driver {
 	const char *name;
 };
 
+struct rte_devargs;
+
 struct rte_bus_device {
 	const char *name;
+	struct rte_devargs *devargs;
 };
 
 /**
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index 10a2306..b894913 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -165,7 +165,6 @@ struct rte_pci_device {
 	struct rte_pci_driver *driver;          /**< Associated driver */
 	uint16_t max_vfs;                       /**< sriov enable if not zero */
 	int numa_node;                          /**< NUMA node connection */
-	struct rte_devargs *devargs;            /**< Device user arguments */
 	enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
 	struct rte_bus_device dev;              /**< Generic device */
 };
-- 
2.7.0

  parent reply	other threads:[~2016-01-18 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 16:03 [dpdk-dev] [RFC 0/6] Preview of a big eal/ethdev cleanup Jan Viktorin
2016-01-18 16:03 ` [dpdk-dev] [RFC 1/6] eal: introduce rte_bus_device and rte_bus_driver Jan Viktorin
2016-01-18 16:03 ` [dpdk-dev] [RFC 2/6] eal: define macro container_of Jan Viktorin
2016-01-18 16:03 ` Jan Viktorin [this message]
2016-01-18 16:03 ` [dpdk-dev] [RFC 4/6] eal: move numa_node from rte_pci_device to rte_device Jan Viktorin
2016-01-18 16:03 ` [dpdk-dev] [RFC 5/6] eal: move intr_handle " Jan Viktorin
2016-01-18 16:03 ` [dpdk-dev] [RFC 6/6] eal: move driver pointer from rte_pci_device to rte_bus_device Jan Viktorin

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=1453132987-20564-4-git-send-email-viktorin@rehivetech.com \
    --to=viktorin@rehivetech.com \
    --cc=dev@dpdk.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).