* [dpdk-users] Retrieve NIC vendor name using PCI vendor ID
@ 2017-09-08 13:35 george.dit
2017-09-08 15:55 ` Stephen Hemminger
0 siblings, 1 reply; 4+ messages in thread
From: george.dit @ 2017-09-08 13:35 UTC (permalink / raw)
To: users
Hi all,
I would like to ask how one could retrieve the name of a NIC's vendor using
the PCI vendor ID.
For example, is there any mapping between PCI_VENDOR_ID_INTEL and a const
char* that returns e.g., "Intel"?
Moreover, why are the vendor IDs redefined by DPDK instead of being reused
from Linux
<https://github.com/torvalds/linux/blob/master/include/linux/pci_ids.h>?
It would be more convenient if a single RTE library could expose those IDs
to the applications. Currently I see those IDs being spread across the
different drivers.
Thanks in advance,
--
Georgios Katsikas
Industrial Ph.D. Student
Network Intelligence Group
Decision, Networks, and Analytics (DNA) Lab
RISE SICS
E-Mail: georgios.katsikas@ri.se
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] Retrieve NIC vendor name using PCI vendor ID
2017-09-08 13:35 [dpdk-users] Retrieve NIC vendor name using PCI vendor ID george.dit
@ 2017-09-08 15:55 ` Stephen Hemminger
2017-09-10 18:55 ` Rosen, Rami
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2017-09-08 15:55 UTC (permalink / raw)
To: george.dit; +Cc: users
On Fri, 8 Sep 2017 06:35:59 -0700
george.dit@gmail.com wrote:
> Hi all,
>
> I would like to ask how one could retrieve the name of a NIC's vendor using
> the PCI vendor ID.
> For example, is there any mapping between PCI_VENDOR_ID_INTEL and a const
> char* that returns e.g., "Intel"?
>
> Moreover, why are the vendor IDs redefined by DPDK instead of being reused
> from Linux
> <https://github.com/torvalds/linux/blob/master/include/linux/pci_ids.h>?
> It would be more convenient if a single RTE library could expose those IDs
> to the applications. Currently I see those IDs being spread across the
> different drivers.
>
> Thanks in advance,
There already is a standard library for this (libpci).
I see no reason to add this to DPDK.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] Retrieve NIC vendor name using PCI vendor ID
2017-09-08 15:55 ` Stephen Hemminger
@ 2017-09-10 18:55 ` Rosen, Rami
2017-09-11 7:10 ` george.dit
0 siblings, 1 reply; 4+ messages in thread
From: Rosen, Rami @ 2017-09-10 18:55 UTC (permalink / raw)
To: Stephen Hemminger, george.dit; +Cc: users
Hi, George,
>There already is a standard library for this (libpci).
>I see no reason to add this to DPDK.
+1.
Follow in pciutils execution of, for example,
"lspci -d 8086:158b"
Where you get, for example:
03:00.0 Ethernet controller: Intel Corporation Device 158b (rev 02)
(or any other vendrID:DeviceID combo).
I would guess that behinds the scenes it is done by pci_lookup_name():
https://github.com/pciutils/pciutils/blob/master/lib/names.c#L122
Regards,
Rami Rosen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] Retrieve NIC vendor name using PCI vendor ID
2017-09-10 18:55 ` Rosen, Rami
@ 2017-09-11 7:10 ` george.dit
0 siblings, 0 replies; 4+ messages in thread
From: george.dit @ 2017-09-11 7:10 UTC (permalink / raw)
To: Rosen, Rami; +Cc: Stephen Hemminger, users
Hi Stephen and Rami,
I see your point, libpci seems to be the way to go.
Thanks,
Georgios
On Sun, Sep 10, 2017 at 11:55 AM, Rosen, Rami <rami.rosen@intel.com> wrote:
> Hi, George,
>
> >There already is a standard library for this (libpci).
> >I see no reason to add this to DPDK.
>
> +1.
>
> Follow in pciutils execution of, for example,
> "lspci -d 8086:158b"
> Where you get, for example:
> 03:00.0 Ethernet controller: Intel Corporation Device 158b (rev 02)
> (or any other vendrID:DeviceID combo).
>
> I would guess that behinds the scenes it is done by pci_lookup_name():
> https://github.com/pciutils/pciutils/blob/master/lib/names.c#L122
>
> Regards,
> Rami Rosen
>
>
>
--
Georgios Katsikas
Industrial Ph.D. Student
Network Intelligence Group
Decision, Networks, and Analytics (DNA) Lab
RISE SICS
E-Mail: georgios.katsikas@ri.se
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-11 7:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-08 13:35 [dpdk-users] Retrieve NIC vendor name using PCI vendor ID george.dit
2017-09-08 15:55 ` Stephen Hemminger
2017-09-10 18:55 ` Rosen, Rami
2017-09-11 7:10 ` george.dit
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).