[dpdk-dev] PCI device mapping to socket
François-Frédéric Ozog
ff at ozog.com
Wed Dec 18 21:42:58 CET 2013
Hi,
It depends on the kernel version. For the latests ones you can use:
cat /sys/class/net/<interface name>/device/numa_node
in all other case, you can use lspci fallback (in case even no driver is yet
loaded).
lspci | grep Ethernet
09:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network
Connection (rev 01)
09:00.3 Ethernet controller: Intel Corporation I350 Gigabit Network
Connection (rev 01)
lspci -t
\-[0000:00]-+-00.0
+-01.0-[01-03]----00.0-[02-03]----08.0-[03]--+-00.0
| +-00.3
.
.
+-1c.0-[09-0a]--+-00.0
| +-00.1
| +-00.2
| \-00.3
So the PCI bus is 0.
Now transform this to socket number:
Space=0x100/<nbsocket>
On a dual socket space=0x80, bus(0*space=0) is socket 0, bus(1*space=0x80)
is socket1.
On a quad socket space=0x40, bus(0*space=0) is socket 0, bus(1*space=0x40)
is socket1, bus(2*space=0x80) is socket2, bus(3*space=0xc0) is socket3 .
François-Frédéric
> -----Message d'origine-----
> De : dev [mailto:dev-bounces at dpdk.org] De la part de Benson, Bryan
> Envoyé : mercredi 18 décembre 2013 21:20
> À : dev at dpdk.org
> Objet : [dpdk-dev] PCI device mapping to socket
>
> All,
> Does anyone know of a way I can find out which socket a PCI device/bridge
> is tied up to? I have looked into dmidecode and lspci to no avail, but I
> may be missing something. We are looking at putting multiple NICs into a
> single dual socket server.
>
> This is so that I can tie specific NIC ports to the proper socket to take
> advantage of DDIO.
>
> Thank you,
> Bryan Benson
> Amazon Web Services
More information about the dev
mailing list