ethdev: support PCI domains
PATCH 1/1 ethdev: support PCI domains
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.
--- lib/librte_ether/rte_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_ether/rte_ethdev.c +2 -1
@@ -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 )
Signature · 1 line
1.8.2.1
Quoted 9 lines · On Fri, 22 Jul 2016 11:34:10 -0400 Sinan Kaya <[email protected]> wrote:
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 <[email protected]>
I ran into this yes. There is a small risk of breaking some application that assumed something about names though.
Quoted 11 lines · Stephen Hemminger
Quoted 8 lines · On Fri, 22 Jul 2016 11:34:10 -0400 Sinan Kaya <[email protected]> wrote:
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.
Quoted 7 lines
Quoted 1 line
Signed-off-by Sinan Kaya <[email protected]>I ran into this yes. There is a small risk of breaking some application that assumed something about names though.
Thanks, hopefully the change is minor and can be contained until next release.
Signature · 3 lines
Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
2016-07-22 18:56, Sinan Kaya:
Quoted 14 lines · Stephen Hemminger
Quoted 13 lines
Quoted 9 lines · On Fri, 22 Jul 2016 11:34:10 -0400 Sinan Kaya <[email protected]> wrote:
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 <[email protected]>
Quoted 7 lines
Quoted 5 lines
I ran into this yes. There is a small risk of breaking some application that assumed something about names though.
Thanks, hopefully the change is minor and can be contained until next release.
It is part of the EAL rework.
The function has been moved in EAL and includes the PCI domain:
http://dpdk.org/commit/affe1cdc
Quoted 18 lines · Thomas Monjalon
2016-07-22 18:56, Sinan Kaya:
Quoted 17 lines · Stephen Hemminger
Quoted 16 lines
Quoted 9 lines · On Fri, 22 Jul 2016 11:34:10 -0400 Sinan Kaya <[email protected]> wrote:
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 <[email protected]>I ran into this yes. There is a small risk of breaking some application that assumed something about names though.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Thanks, hopefully the change is minor and can be contained until next release.
It is part of the EAL rework.
The function has been moved in EAL and includes the PCI domain:
http://dpdk.org/commit/affe1cdc
Thanks for taking care of it.
Signature · 3 lines
Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.