All of lore.kernel.org
 help / color / mirror / Atom feed
* [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 related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ethdev: support PCI domains
  2016-07-22 15:34 [PATCH] ethdev: support PCI domains Sinan Kaya
@ 2016-07-22 21:12 ` Stephen Hemminger
  2016-07-22 22:56   ` Sinan Kaya
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2016-07-22 21:12 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: dev

On Fri, 22 Jul 2016 11:34:10 -0400
Sinan Kaya <okaya@codeaurora.org> 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 <okaya@codeaurora.org>

I ran into this yes. There is a small risk of breaking some application that
assumed something about names though.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [PATCH] ethdev: support PCI domains
  2016-07-22 21:12 ` Stephen Hemminger
@ 2016-07-22 22:56   ` Sinan Kaya
  2016-10-04  8:15     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Sinan Kaya @ 2016-07-22 22:56 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On 7/22/2016 5:12 PM, Stephen Hemminger wrote:
> On Fri, 22 Jul 2016 11:34:10 -0400
> Sinan Kaya <okaya@codeaurora.org> 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 <okaya@codeaurora.org>
> 
> I ran into this yes. There is a small risk of breaking some application that
> assumed something about names though.
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> 

Thanks, hopefully the change is minor and can be contained until next release.

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

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

* Re: [PATCH] ethdev: support PCI domains
  2016-07-22 22:56   ` Sinan Kaya
@ 2016-10-04  8:15     ` Thomas Monjalon
  2016-10-04 13:59       ` Sinan Kaya
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2016-10-04  8:15 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: dev, Stephen Hemminger

2016-07-22 18:56, Sinan Kaya:
> On 7/22/2016 5:12 PM, Stephen Hemminger wrote:
> > On Fri, 22 Jul 2016 11:34:10 -0400
> > Sinan Kaya <okaya@codeaurora.org> 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 <okaya@codeaurora.org>
> > 
> > I ran into this yes. There is a small risk of breaking some application that
> > assumed something about names though.
> > 
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> > 
> 
> 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

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

* Re: [PATCH] ethdev: support PCI domains
  2016-10-04  8:15     ` Thomas Monjalon
@ 2016-10-04 13:59       ` Sinan Kaya
  0 siblings, 0 replies; 5+ messages in thread
From: Sinan Kaya @ 2016-10-04 13:59 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Stephen Hemminger

On 10/4/2016 4:15 AM, Thomas Monjalon wrote:
> 2016-07-22 18:56, Sinan Kaya:
>> On 7/22/2016 5:12 PM, Stephen Hemminger wrote:
>>> On Fri, 22 Jul 2016 11:34:10 -0400
>>> Sinan Kaya <okaya@codeaurora.org> 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 <okaya@codeaurora.org>
>>>
>>> I ran into this yes. There is a small risk of breaking some application that
>>> assumed something about names though.
>>>
>>> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>>>
>>
>> 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.

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

^ 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 [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 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.