From: Sinan Kaya <okaya@codeaurora.org>
To: dev@dpdk.org
Cc: Sinan Kaya <okaya@codeaurora.org>
Subject: [PATCH] ethdev: support PCI domains
Date: Fri, 22 Jul 2016 11:34:10 -0400 [thread overview]
Message-ID: <1469201650-32447-1-git-send-email-okaya@codeaurora.org> (raw)
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
next reply other threads:[~2016-07-22 15:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 15:34 Sinan Kaya [this message]
2016-07-22 21:12 ` [PATCH] ethdev: support PCI domains Stephen Hemminger
2016-07-22 22:56 ` Sinan Kaya
2016-10-04 8:15 ` Thomas Monjalon
2016-10-04 13:59 ` Sinan Kaya
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=1469201650-32447-1-git-send-email-okaya@codeaurora.org \
--to=okaya@codeaurora.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.