From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 831FAA0032 for ; Wed, 13 Jul 2022 09:26:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58BD34282B; Wed, 13 Jul 2022 09:26:52 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 190714069D for ; Wed, 13 Jul 2022 09:26:50 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id y14-20020a17090a644e00b001ef775f7118so2264263pjm.2 for ; Wed, 13 Jul 2022 00:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/PTzKiTj1mNjZXGM0nAHNpJnZdyJxSlWS5JBowZM5iI=; b=JPvsWbX9OmvJz1utX9ogMbpaKPX1+P6lEXiLoJo0iWecNzVtsiqFIxc/2BgxJ6wJar NGzgh7nX3gE2DGrSgNTMn3ilVuFX2GXysZKJJGhP0p3mzaOmftGsVKb/5M2uNJBSQUef FVwhdw3olsAlYtExKCXwwn7re1813WlMSDf3AGj2BTcuVAkgGM3A3TyY2PPLjcSapYaK uw1kvOi5xZyj8dDZcbl1G4RTGsPEeHzMtuVYoJtnb1GVUOxC/YpnEXxFr1s9FN+9InKH KM6CXk2xnZmytnElFfqTnN2Yo2+ibxslxN427RsVTgkltGxHm5YcUWrjA8I+XSl4LFG/ D0NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/PTzKiTj1mNjZXGM0nAHNpJnZdyJxSlWS5JBowZM5iI=; b=cN4tDw++S5aAVASYqF92gKKO6XKBCFmLQvSWmA7YjgEQncDHXB6ZGt4UKminp0lC6z 5qaK8Nc0qsCU7JoiOWHDtgssTvRgWm3vjonwOC3FR85FRn0DCU61rHIG+EweCCDUpm4T ySBcylnA8uJQDmOuDItsHVbaGqpSr+wq1b5LFIS1qw2pjwff2s9uFeKsZl+w0777j9mh JrQoSmdVxcqsD5S47gHqNpe+Bg3zfUnSpY/m0RS/vzuufS9JwNFATrD6c6mXfNMPa9Mv GqgSjP97GZOLdL+ldlYbYhjHJtMsBBC5CdflpSRYQ3Fl3SEmlmwi8AgTDS7DxD0VefcY 7O/Q== X-Gm-Message-State: AJIora/PdmvFoGhbo069yr2CtGf4CcRLa71LmMOU7Hb0qAkmTYUwobt0 8ohEnkb/PsuG/WBA+nCNcTnxHUGXyw/3W6QFTFUUka+eUcs= X-Google-Smtp-Source: AGRyM1v4RJfNB3XWitsooveXSQWT14MbSCspsH0RGXKGI7InKeqklIrxO/R6I8GYkrVJcRFOVgTYd7C51cxfLs3V+QQ= X-Received: by 2002:a17:90a:ff94:b0:1ef:8e7b:c93f with SMTP id hf20-20020a17090aff9400b001ef8e7bc93fmr2381252pjb.104.1657697209186; Wed, 13 Jul 2022 00:26:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lokesh Chakka Date: Wed, 13 Jul 2022 12:56:37 +0530 Message-ID: Subject: Re: skeleton code failing To: David Marchand Cc: users Content-Type: multipart/alternative; boundary="0000000000004c7fbb05e3aab590" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --0000000000004c7fbb05e3aab590 Content-Type: text/plain; charset="UTF-8" Dear David, following is some more stuff i did ================================================== $ sudo dpdk-devbind.py -b vfio-pci 83:00.0 $ sudo dpdk-devbind.py -b vfio-pci 83:00.1 $ sudo dpdk-devbind.py -b uio_pci_generic 83:00.0 83:00.1 Error: Driver 'uio_pci_generic' is not loaded. $ sudo dpdk-devbind.py -b igb_uio 83:00.0 83:00.1 Error: Driver 'igb_uio' is not loaded. $ sudo dpdk-devbind.py -b vfio-pci 83:00.0 83:00.1 Notice: 0000:83:00.0 already bound to driver vfio-pci, skipping Notice: 0000:83:00.1 already bound to driver vfio-pci, skipping ================================================== ~/Desktop/dpdk_examples/skeleton$ gcc main.c -g `pkg-config --cflags libdpdk --libs libdpdk` lokesh@lokesh-ProLiant-DL385-Gen10:~/Desktop/dpdk_examples/skeleton$ sudo ./a.out EAL: Detected CPU lcores: 64 EAL: Detected NUMA nodes: 4 EAL: Detected shared linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Probe PCI driver: net_bnxt (14e4:1750) device: 0000:83:00.0 (socket 2) EAL: Probe PCI driver: net_bnxt (14e4:1750) device: 0000:83:00.1 (socket 2) TELEMETRY: No legacy callbacks, legacy socket not created Port 0 MAC: bc 97 e1 ce 84 f0 Port 1 MAC: bc 97 e1 ce 84 f1 WARNING: Too many lcores enabled. Only 1 used. WARNING, port 0 is on remote NUMA node to polling thread. Performance will not be optimal. WARNING, port 1 is on remote NUMA node to polling thread. Performance will not be optimal. Core 0 forwarding packets. [Ctrl+C to quit] ^C ================================================== After a few seconds, I presses ctrl+c surprisingly cards are not showing up even in ifconfig. Thanks & Regards -- Lokesh Chakka. On Wed, Jul 13, 2022 at 12:43 PM Lokesh Chakka < lvenkatakumarchakka@gmail.com> wrote: > Dear David, > > ================================================= > $ lspci | grep -i broadcom > 83:00.0 Ethernet controller: Broadcom Inc. and subsidiaries BCM57508 > NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb/200Gb Ethernet (rev 11) > 83:00.1 Ethernet controller: Broadcom Inc. and subsidiaries BCM57508 > NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb/200Gb Ethernet (rev 11) > $ lspci -n -s 83:00.0 > 83:00.0 0200: 14e4:1750 (rev 11) > ================================================= > > I am compiling my code like this : > ================================================= > gcc main.c `pkg-config --cflags libdpdk --libs libdpdk` > ================================================= > > Hence it is statically linked code. > If I try > $ dpdk-pmdinfo.py ./a.out > > But I am not seeing any output > > > > Thanks & Regards > -- > Lokesh Chakka. > > > On Wed, Jul 13, 2022 at 12:22 PM David Marchand > wrote: > >> On Wed, Jul 13, 2022 at 7:35 AM Lokesh Chakka >> wrote: >> > Would like to understand if I am missing something. I am new to this >> platform. >> > rte_eth_dev_count_avail is returning zero. >> > OS is Ubuntu 22.04. DPDK is latest version. >> > Cards are being detected by Linux. Ifconfig is showing the cards up. >> LED is also glowing. >> >> Indeed, DPDK provides a userspace driver for some NetXtreme nics >> (which is net/bnxt). >> This userspace driver does not rely on the bnxt Linux kernel driver. >> IOW, this card being detecting and working with the Linux kernel does >> not automatically mean that this nic can work with DPDK. >> >> We need more info on your nic, first. >> >> Can you share the pci id of this nic (like running lspci -n -s >> $pci_address)? >> It should be a 14e4:XXXX. >> >> Then you can check this XXXX against what your dpdk application supports. >> >> If it is a statically linked application, you can run: >> $ dpdk-pmdinfo.py /path/to/your/application >> >> Else, if your application is dynamically linked against DPDK driver, >> you can run this command against the net/bnxt driver .so.22 (for 21.11 >> and later releases): >> $ dpdk-pmdinfo.py /path/to/your/dpdk/drivers/librte_net_bnxt.so.22 >> >> You should get a list of supported NetXtreme nics, like: >> >> [snipped some other drivers compiled in my application] >> PMD NAME: net_bnxt >> PMD HW SUPPORT: >> Broadcom Inc. and subsidiaries (14e4) : BCM5745X NetXtreme-E RDMA >> Virtual Function (1606) (All Subdevices) >> Broadcom Inc. and subsidiaries (14e4) : BCM5745X NetXtreme-E Ethernet >> Virtual Function (1609) (All Subdevices) >> Broadcom Inc. and subsidiaries (14e4) : BCM57454 NetXtreme-E >> 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet (1614) (All Subdevices) >> Broadcom Inc. and subsidiaries (14e4) : NetXtreme-E RDMA Virtual >> Function (16c1) (All Subdevices) >> Broadcom Inc. and subsidiaries (14e4) : NetXtreme-C Ethernet Virtual >> Function (16cb) (All Subdevices) >> [snipped the rest] >> >> I hope you can find a (XXXX) corresponding to your NIC. >> >> >> -- >> David Marchand >> >> --0000000000004c7fbb05e3aab590 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear David,

following is som= e more stuff i did
=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=3D=3D=3D=3D=3D=3D
$ sudo dpdk-devbind.py -b vfio-pci= 83:00.0
$ sudo dpdk-devbind.py -b vfio-pci 83:00.1
$ sudo dpdk-devbi= nd.py -b uio_pci_generic 83:00.0 83:00.1
Error: Driver 'uio_pci_gene= ric' is not loaded.
$ sudo dpdk-devbind.py -b igb_uio 83:00.0 83:00.= 1
Error: Driver 'igb_uio' is not loaded.
$ sudo dpdk-devbind.= py -b vfio-pci 83:00.0 83:00.1
Notice: 0000:83:00.0 already bound to dri= ver vfio-pci, skipping
Notice: 0000:83:00.1 already bound to driver vfio= -pci, skipping
=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=3D=3D=3D=3D=3D=3D
=
~/Desktop/dpdk_examples/skeleton$ gcc main= .c -g `pkg-config --cflags libdpdk --libs libdpdk`
lokesh@lokesh-ProLian= t-DL385-Gen10:~/Desktop/dpdk_examples/skeleton$ sudo ./a.out
EAL: Detec= ted CPU lcores: 64
EAL: Detected NUMA nodes: 4
EAL: Detected shared l= inkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
= EAL: Selected IOVA mode 'VA'
EAL: No available 1048576 kB hugepa= ges reported
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (T= ype 1)
EAL: Probe PCI driver: net_bnxt (14e4:1750) device: 0000:83:00.0 = (socket 2)
EAL: Probe PCI driver: net_bnxt (14e4:1750) device: 0000:83:0= 0.1 (socket 2)
TELEMETRY: No legacy callbacks, legacy socket not created=
Port 0 MAC: bc 97 e1 ce 84 f0
Port 1 MAC: bc 97 e1 ce 84 f1

W= ARNING: Too many lcores enabled. Only 1 used.
WARNING, port 0 is on remo= te NUMA node to polling thread.
Performance will not be optimal.
WAR= NING, port 1 is on remote NUMA node to polling thread.
Performance will= not be optimal.

Core 0 forwarding packets. [Ctrl+C to quit]
^C
=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=3D=3D=3D=3D=3D=3D
After a few seconds, I presses ctrl+c

surprisingly cards are not showing up even in ifcon= fig.



Thanks &= ; Regards
--
Lokesh Chakka.


=
On Wed, Jul 13, 2022 at 12:43 PM Loke= sh Chakka <lvenkatakuma= rchakka@gmail.com> wrote:
Dear David,

=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=3D=3D=3D=3D=3D=
$ lspci | grep -i broadcom
83:00.0 Ethernet controller: Broad= com Inc. and subsidiaries BCM57508 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb/20= 0Gb Ethernet (rev 11)
83:00.1 Ethernet controller: Broadcom Inc. and sub= sidiaries BCM57508 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb/200Gb Ethernet (re= v 11)
$ lspci -n -s 83:00.0
83:00.0 0200: 14e4:1750 (rev 11)
=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=3D= =3D=3D=3D=3D

I am compiling my code like this :
=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=3D= =3D=3D=3D=3D
gcc main.c `pkg-config --cflags libdpdk --libs libdp= dk`
=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=3D=3D=3D= =3D=3D

Hence it is statically linked code.
If I try
$ dpdk-pmdinfo.py ./a.out

Bu= t I am not seeing any output

=


Thanks & Regards=
--
Lokesh Chakka.


On Wed, Jul 13, 2022 at 12:22 PM David Marcha= nd <david= .marchand@redhat.com> wrote:
On Wed, Jul 13, 2022 at 7:35 AM Lokesh Chakka
<lven= katakumarchakka@gmail.com> wrote:
> Would like to understand if I am missing something. I am new to this p= latform.
> rte_eth_dev_count_avail is returning zero.
> OS is Ubuntu 22.04. DPDK is latest version.
> Cards are being detected by Linux. Ifconfig is showing the cards up. L= ED is also glowing.

Indeed, DPDK provides a userspace driver for some NetXtreme nics
(which is net/bnxt).
This userspace driver does not rely on the bnxt Linux kernel driver.
IOW, this card being detecting and working with the Linux kernel does
not automatically mean that this nic can work with DPDK.

We need more info on your nic, first.

Can you share the pci id of this nic (like running lspci -n -s $pci_address= )?
It should be a 14e4:XXXX.

Then you can check this XXXX against what your dpdk application supports.
If it is a statically linked application, you can run:
$ dpdk-pmdinfo.py /path/to/your/application

Else, if your application is dynamically linked against DPDK driver,
you can run this command against the net/bnxt driver .so.22 (for 21.11
and later releases):
$ dpdk-pmdinfo.py /path/to/your/dpdk/drivers/librte_net_bnxt.so.22

You should get a list of supported NetXtreme nics, like:

[snipped some other drivers compiled in my application]
PMD NAME: net_bnxt
PMD HW SUPPORT:
=C2=A0Broadcom Inc. and subsidiaries (14e4) : BCM5745X NetXtreme-E RDMA
Virtual Function (1606) (All Subdevices)
=C2=A0Broadcom Inc. and subsidiaries (14e4) : BCM5745X NetXtreme-E Ethernet=
Virtual Function (1609) (All Subdevices)
=C2=A0Broadcom Inc. and subsidiaries (14e4) : BCM57454 NetXtreme-E
10Gb/25Gb/40Gb/50Gb/100Gb Ethernet (1614) (All Subdevices)
=C2=A0Broadcom Inc. and subsidiaries (14e4) : NetXtreme-E RDMA Virtual
Function (16c1) (All Subdevices)
=C2=A0Broadcom Inc. and subsidiaries (14e4) : NetXtreme-C Ethernet Virtual<= br> Function (16cb) (All Subdevices)
[snipped the rest]

I hope you can find a (XXXX) corresponding to your NIC.


--
David Marchand

--0000000000004c7fbb05e3aab590--