From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Fran=E7ois-Fr=E9d=E9ric_Ozog?= Subject: Re: PCI device mapping to socket Date: Wed, 18 Dec 2013 21:42:58 +0100 Message-ID: <02e901cefc31$bcfda6a0$36f8f3e0$@com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: "'Benson, Bryan'" , Return-path: In-Reply-To: Content-Language: fr List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi, It depends on the kernel version. For the latests ones you can use: cat /sys/class/net//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=3D0x100/ On a dual socket space=3D0x80, bus(0*space=3D0) is socket 0, = bus(1*space=3D0x80) is socket1. On a quad socket space=3D0x40, bus(0*space=3D0) is socket 0, = bus(1*space=3D0x40) is socket1, bus(2*space=3D0x80) is socket2, bus(3*space=3D0xc0) is = socket3 . Fran=E7ois-Fr=E9d=E9ric > -----Message d'origine----- > De=A0: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] De la part de Benson, Bryan > Envoy=E9=A0: mercredi 18 d=E9cembre 2013 21:20 > =C0=A0: dev-VfR2kkLFssw@public.gmane.org > Objet=A0: [dpdk-dev] PCI device mapping to socket >=20 > 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. >=20 > This is so that I can tie specific NIC ports to the proper socket to = take > advantage of DDIO. >=20 > Thank you, > Bryan Benson > Amazon Web Services