From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by dpdk.org (Postfix) with ESMTP id 1198B2904 for ; Wed, 12 Oct 2016 19:47:48 +0200 (CEST) Received: by mail-qk0-f196.google.com with SMTP id z190so4145664qkc.3 for ; Wed, 12 Oct 2016 10:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dgmMMQSkkHeGP0sPfd5pwVFqPp8vdnUnoOofo0LnAhQ=; b=tk9EjfV0CRegZWXPbOgSzi9jZfOEW/PUNtumqspEd1HoKx/fEP/chdOhe9V6jcgO/U D4fY/OIZcitlNsgej0HhRhqkEXUnImSsQe3FZzvplIb6H0FMietlzJIMlyeCeLBiA96j E8bV4vV3fzqF+BZbT1ZvlCYUONccQCtn16yxdj43aOknAUsaH7/Hznc12k6XHFFc3rUK Y5sXQx421yQaaxxxCT4UI+BV2LQE+W4V62PkFsWqDPEhn9F/o80EXN7hl0DrqMYseeWF 6Kkjrf9t4jJvmDbTDppXGhPkVQ3IgGyWNhkYWU/adpGEMkeH0PU+AEt9pVtleE0dEHyd zefQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dgmMMQSkkHeGP0sPfd5pwVFqPp8vdnUnoOofo0LnAhQ=; b=kAkdjfdHrzddj6qFboeM6NLf7Myf6qIXmvUvP8vdWINMyD0RQI03kl8zinLhkvw9df 7xXxr1qDw8x5dHL7jxvzLXRVkIAYWJtLkbYKwaN1AhC7iKsgGGsh3PGQuKlhRDMqBTn2 rLrxqrn/zAOqCTtbsibn2njAfHbdEQC5ZBxf6wsVYlVYD5DGOTOCk/w3ZgW8JxDAZMYL JhBJnT0bmZLm7trVAuMGcPXZDTTNPe7qxL7DL2wrT3QYuY+kln7IQzUFqXRkQBV2b7rY hcsGDqD3jvZYdZaJM9UALxRr9avh7a93lmlmkTUtBTzR6eXtc880qyqr6fbJ8skOm5HC SucQ== X-Gm-Message-State: AA6/9RmkutmeNnbo7aHVYdWpFICvQTerCe0tnK3//ddN82BtmrD6DGr988ueyAuOj2j22ZLrbZ0MR17/+pqI/A== X-Received: by 10.55.156.22 with SMTP id f22mr2892507qke.36.1476294467385; Wed, 12 Oct 2016 10:47:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.125.65 with HTTP; Wed, 12 Oct 2016 10:47:25 -0700 (PDT) In-Reply-To: References: From: Aniraj Kesavan Date: Wed, 12 Oct 2016 11:47:25 -0600 Message-ID: To: Andriy Berestovskyy Cc: users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Need help understanding rte_eth_dev_count X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 17:47:48 -0000 I did follow the i40e instructions to startup testpmd application. My pci id for the X710 is 0000:04:00.0. I did sudo python ./tools/dpdk-devbind.py --bind igb_uio 0000:04:00.0 to bind after which it started up showing in dev-bind status. Network devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:04:00.0 'Ethernet Controller X710 for 10GbE SFP+' drv=3Digb_uio unused= =3D =E2=80=8B =E2=80=8BWhWhWhs When I try to run testpmd, I don't see my pci device listed and it's not probed, it directly tries to probe VFIO support. This is the output when I run testpmd. anirajk@node-0:/local/RAMCloud/dpdk$ sudo LD_LIBRARY_PATH=3D/local/RAMCloud/dpdk/x86_64-native-linuxapp-gcc/lib ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 04:00.0 -- -i EAL: Detected 32 lcore(s) EAL: No free hugepages reported in hugepages-2048kB EAL: Probing VFIO support... EAL: WARNING: Master core has no memory on local socket! EAL: No probed ethernet devices Interactive-mode selected USER1: create a new mbuf pool : n=3D171456, size=3D2176, socket=3D0 EAL: Error - exiting with code: 1 Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory =E2=80=8B Dmesg popped up this: [Oct12 11:26] igb_uio: Use MSIX interrupt by default [Oct12 11:27] i40e 0000:04:00.0: removed PHC from eth6 [ +0.024267] igb_uio 0000:04:00.0: uio device registered with irq 4d [Oct12 11:29] Bits 55-60 of /proc/PID/pagemap entries are about to stop being page-shift some time soon. See the linux/Documentation/vm/pagemap.txt for details. =E2=80=8B I'm running with sudo and have 1GB hugepages enabled and mounted. What other reasons could possibly prevent the pci device from not being recognised while testpmd is starting up? On Wed, Oct 12, 2016 at 1:36 AM, Andriy Berestovskyy wrote: > Hey, > In 16.07 the PMDs drivers get register using the PMD_REGISTER_DRIVER(): > http://dpdk.org/browse/dpdk/tree/lib/librte_eal/common/ > include/rte_dev.h?id=3Dv16.07#n187 > > The macro uses constructor attribute, so the drivers get registered > during the application startup, prior the main() function. > > > Regarding the configuration, try to reproduce the steps listed in the > documentation: > http://dpdk.org/doc/guides/nics/i40e.html > > Andriy > > > On Wed, Oct 12, 2016 at 6:44 AM, Aniraj Kesavan > wrote: > > Hi, > > > > I'm very new to dpdk and I'm trying to set it up on a cluster with the > > following configuration: > > DPDK - 16.07 > > Intel X710 2x10G Nics > > Ubuntu 15.04 > > > > I could compile it, but when running sample applications such as > > skeleton/basicfwd and testpmd, it fails saying the ports aren't detecte= d. > > > > I have done the following: > > enabled 1G huge pages and mounted them under /dev/hugepages > > ran dpdk-devbind.py on the interfaces after which the status shows: > > > > Network devices using DPDK-compatible driver > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 0000:04:00.0 'Ethernet Controller X710 for 10GbE SFP+' drv=3Digb_uio > unused=3D > > 0000:04:00.1 'Ethernet Controller X710 for 10GbE SFP+' drv=3Digb_uio > unused=3D > > > > While running gdb over the basicfwd application (run as sudo as it seem= ed > > like a requirement), it seems like rte_eth_dev_count is returning 0. Ev= en > > the testpmd application is reporting no ports available. I have tried t= he > > portmask option and tried to pass the interfaces as -w arguments too. > > > > When I looked at rte_eth_dev_count, it's returning an unsigned static i= nt > > that is only updated by rte_eth_dev_allocate. Following the breadcrumbs= , > it > > seemed like someone needed to invoke rte_eth_dev_register. I didn't see > > that being called in the basicfwd example's codepath. > > > > Can anyone tell me what usually causes rte_eth_dev_register to run and > > update the port number? Or is there anything I might have missed in the > > configuration that's causing the device to not show up when the library > is > > looking for it. > > > > > > > > Thanks, > > Aniraj > > > > > > > > -- > > Aniraj Kesavan > > > > MS CS '15-'17, > > University Of Utah > > CS '08-'12, > > Govt. Model Engineering College > > alternate e-mail:anirajkalathel@gmail.com > > http://www.cs.utah.edu/~aniraj/ > > > > -- > Andriy Berestovskyy > --=20 Aniraj Kesavan MS CS '15-'17, University Of Utah CS '08-'12, Govt. Model Engineering College alternate e-mail:anirajkalathel@gmail.com http://www.cs.utah.edu/~aniraj/