From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] pci: remove flag for multiple devices with single id
Date: Mon, 29 Sep 2014 12:59:06 +0200 [thread overview]
Message-ID: <1411988346-20861-1-git-send-email-thomas.monjalon@6wind.com> (raw)
The flag RTE_PCI_DRV_MULTIPLE was used to register an eth_driver allowing
multiples devices with a single PCI id.
It is now possible to register a pci_driver and create ethdev objects
using rte_eth_dev_allocate().
Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
lib/librte_eal/common/eal_common_pci.c | 10 ----------
lib/librte_eal/common/include/rte_pci.h | 4 ++--
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index af809a8..f3c7f71 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -103,10 +103,6 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)
* If vendor/device ID match, call the devinit() function of all
* registered driver for the given device. Return -1 if initialization
* failed, return 1 if no driver is found for this device.
- * For drivers with the RTE_PCI_DRV_MULTIPLE flag enabled, register
- * the same device multiple times until failure to do so.
- * It is required for non-Intel NIC drivers provided by third-parties such
- * as 6WIND.
*/
static int
pci_probe_all_drivers(struct rte_pci_device *dev)
@@ -122,12 +118,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
if (rc > 0)
/* positive value means driver not found */
continue;
- /* initialize subsequent driver instances for this device */
- if ((dr->drv_flags & RTE_PCI_DRV_MULTIPLE) &&
- (dev->devargs == NULL ||
- dev->devargs->type != RTE_DEVTYPE_BLACKLISTED_PCI))
- while (rte_eal_pci_probe_one_driver(dr, dev) == 0)
- ;
return 0;
}
return 1;
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index d6b1c1b..66ed793 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -193,8 +193,8 @@ struct rte_pci_driver {
/** Device needs PCI BAR mapping (done with either IGB_UIO or VFIO) */
#define RTE_PCI_DRV_NEED_MAPPING 0x0001
-/** Device driver must be registered several times until failure */
-#define RTE_PCI_DRV_MULTIPLE 0x0002
+/** Device driver must be registered several times until failure - deprecated */
+#pragma GCC poison RTE_PCI_DRV_MULTIPLE
/** Device needs to be unbound even if no module is provided */
#define RTE_PCI_DRV_FORCE_UNBIND 0x0004
/** Device driver supports link state interrupt */
--
2.0.4
next reply other threads:[~2014-09-29 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 10:59 Thomas Monjalon [this message]
2014-09-29 14:37 ` Thomas Monjalon
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=1411988346-20861-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.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).