* [dpdk-users] DPDK device name @ 2018-04-19 6:12 Filip Janiszewski 2018-04-19 7:15 ` Rosen, Rami 0 siblings, 1 reply; 3+ messages in thread From: Filip Janiszewski @ 2018-04-19 6:12 UTC (permalink / raw) To: users Hi, Is there any mapping between the port names I see while using 'ifconfig' and the port numbers I use normally to handle NIC ports? In other words, is there a way to identify which ports number corresponds to a given linux interface name? Thanks -- BR, Filip +48 666 369 823 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-users] DPDK device name 2018-04-19 6:12 [dpdk-users] DPDK device name Filip Janiszewski @ 2018-04-19 7:15 ` Rosen, Rami 2018-04-19 16:24 ` Stephen Hemminger 0 siblings, 1 reply; 3+ messages in thread From: Rosen, Rami @ 2018-04-19 7:15 UTC (permalink / raw) To: Filip Janiszewski, users Hi Flip, I assume that by "port numbers" you mean the PCI bus id (BDF) that is used by DPDK (for bind, for example). You can fetch the bus id for a netdevice named "eth0" by ethtool -i eth0 | grep bus-info bus-info: 0000:01:00.0 If you mean the internal port number (starting from 0 for the first port, and so on) inside DPDK, then there is no mapping between the interface name (as seen by ifconfig) and the internal DPDK port number. Regards, Rami Rosen -----Original Message----- From: users [mailto:users-bounces@dpdk.org] On Behalf Of Filip Janiszewski Sent: Thursday, April 19, 2018 09:13 To: users@dpdk.org Subject: [dpdk-users] DPDK device name Hi, Is there any mapping between the port names I see while using 'ifconfig' and the port numbers I use normally to handle NIC ports? In other words, is there a way to identify which ports number corresponds to a given linux interface name? Thanks -- BR, Filip +48 666 369 823 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-users] DPDK device name 2018-04-19 7:15 ` Rosen, Rami @ 2018-04-19 16:24 ` Stephen Hemminger 0 siblings, 0 replies; 3+ messages in thread From: Stephen Hemminger @ 2018-04-19 16:24 UTC (permalink / raw) To: Rosen, Rami; +Cc: Filip Janiszewski, users On Thu, 19 Apr 2018 07:15:07 +0000 "Rosen, Rami" <rami.rosen@intel.com> wrote: > Hi Flip, > I assume that by "port numbers" you mean the PCI bus id (BDF) > that is used by DPDK (for bind, for example). > > You can fetch the bus id for a netdevice named "eth0" by > ethtool -i eth0 | grep bus-info > bus-info: 0000:01:00.0 > > If you mean the internal port number (starting from 0 for the first port, and so on) inside DPDK, then there is no > mapping between the interface name (as seen by ifconfig) and the internal DPDK port number. > > Regards, > Rami Rosen > > > > -----Original Message----- > From: users [mailto:users-bounces@dpdk.org] On Behalf Of Filip Janiszewski > Sent: Thursday, April 19, 2018 09:13 > To: users@dpdk.org > Subject: [dpdk-users] DPDK device name > > Hi, > > Is there any mapping between the port names I see while using 'ifconfig' > and the port numbers I use normally to handle NIC ports? In other words, is there a way to identify which ports number corresponds to a given linux interface name? > > Thanks > > -- > BR, Filip > +48 666 369 823 Short answer No. Long answer. DPDK devices can be virtual, shared, or connected to a bus. Most devices are connected to Pci bus and must be unbound and rebound to use DPDK userspace i/o. The PCI address is the underlying value used by DPDK. You can find the value via sysfs /sys/class/net/ethN/device (reliable) or ethtool (works for most devices). But once device is unbound from the kernel driver, it no longer has a kernel assigned name. DPDK port numbers are assigned in order, so if multiple devices are used by DPDK they are seen in lexical order as PCI scanning occurs. It is also possible to use KNI to get a kernel network interface for a DPDK port. Lots of options. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-19 16:24 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-04-19 6:12 [dpdk-users] DPDK device name Filip Janiszewski 2018-04-19 7:15 ` Rosen, Rami 2018-04-19 16:24 ` Stephen Hemminger
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).