DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: support PCI domains
@ 2016-07-22 15:34 Sinan Kaya
  2016-07-22 21:12 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Sinan Kaya @ 2016-07-22 15:34 UTC (permalink / raw)
  To: dev; +Cc: Sinan Kaya

The current code is enumerating devices based on bus, device and function
pairs. This does not work well for architectures with multiple PCI
segments/domains. Multiple PCI devices will have the same BDF value but
different segment numbers (01:01:01.0 and 02:01:01.0) for instance.

Adding segment numbers to device naming so that we can uniquely identify
devices.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
 lib/librte_ether/rte_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 0a6e3f1..929240f 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -226,7 +226,8 @@ rte_eth_dev_create_unique_device_name(char *name, size_t size,
 {
 	int ret;
 
-	ret = snprintf(name, size, "%d:%d.%d",
+	ret = snprintf(name, size, "%d:%d:%d.%d",
+			pci_dev->addr.domain,
 			pci_dev->addr.bus, pci_dev->addr.devid,
 			pci_dev->addr.function);
 	if (ret < 0)
-- 
1.8.2.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-04 14:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-22 15:34 [dpdk-dev] [PATCH] ethdev: support PCI domains Sinan Kaya
2016-07-22 21:12 ` Stephen Hemminger
2016-07-22 22:56   ` Sinan Kaya
2016-10-04  8:15     ` Thomas Monjalon
2016-10-04 13:59       ` Sinan Kaya

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).