Troubles using pdump to capture the packets

2021-10-12 Thread 廖書華
Dear all,

In our environment, the DPDK version is for 19.11.
Currently, we try to use pdump to capture the packet of our own
application, however, we got the below error in our application and pdump
respectively. (If we replace our application with test-pmd, pdump will not
get the error)

Error in our application :
EAL: failed to parse device “vdev:net_pcap_rx_0”
EAL: Failed to hotplug add device on primary
Error in pdump : The error is caused since function *rte_dev_probe()* will
return -14
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failed:create_mp_ring_vdev:700

Taking the reference from DPDK email list, I already added the library
(-Wl,-lrte_pdump -Wl,-lrte_pmd_pcap -Wl,-lpcap) in my application Makefile
and recompile my application again, however, still got the same error
message. Can someone give me some suggestions ?

*Here's the complete log related to DPDK on my application.*
[oran@localhost app]$ sudo -E LD_LIBRARY_PATH=$LD_LIBRARY_PATH
./run_o_ru.sh.
.
.
.
xran_ethdi_init_dpdk_io: Calling rte_eal_init:wls_1 -c 0x88001 -n2
--iova-mode=pa --socket-mem=8192 --socket-limit=8192 --proc-type=auto
--file-prefix wls_1 -w :00:00.0 EAL: Detected 96 lcore(s) EAL: Detected
2 NUMA nodes EAL: Auto-detected process type: PRIMARY EAL: Multi-process
socket /var/run/dpdk/wls_1/mp_socket EAL: Selected IOVA mode 'PA' EAL:
Probing VFIO support... EAL: VFIO support initialized dump : 0 EAL: PCI
device :18:0a.0 on NUMA socket 0 EAL: probe driver: 8086:154c
net_i40e_vf EAL: using IOMMU type 1 (Type 1) initializing port 0 for TX,
drv=net_i40e_vf Port 0 MAC: 00 11 22 33 44 55 Port 0: nb_rxd 4096 nb_txd
4096 Checking link status portid [0] ... done Port 0 Link Up - speed 1
Mbps - full-duplex EAL: PCI device :18:0a.1 on NUMA socket 0 EAL: probe
driver: 8086:154c net_i40e_vf initializing port 1 for TX, drv=net_i40e_vf
Port 1 MAC: 00 11 22 33 44 55 Port 1: nb_rxd 4096 nb_txd 4096 EAL: failed
to parse device "vdev:net_pcap_rx_0" EAL: Failed to hotplug add device on
primary Checking link status portid [1] ... done Port 1 Link Up - speed
1 Mbps - full-duplex vf 0 local SRC MAC: 00 11 22 33 44 55 vf 0 remote
DST MAC: 00 11 22 33 44 66 vf 1 local SRC MAC: 00 11 22 33 44 55 vf 1
remote DST MAC: 00 11 22 33 44 66

*Here's the complete log of pdump.*
[oran@localhost pdump]$ sudo ./dpdk-pdump -- --pdump
'port=0,queue=*,tx-dev=/tmp/tx.pcap,rx-dev=/tmp/rx.pcap' EAL: Detected 96
lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket
/var/run/dpdk/wls_1/mp_socket_10639_24929237def08 EAL: Selected IOVA mode
'VA' EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI
device :00:04.0 on NUMA socket 0 EAL: probe driver: 8086:2021
rawdev_ioat EAL: PCI device :00:04.1 on NUMA socket 0 EAL: probe
driver: 8086:2021 rawdev_ioat EAL: PCI device :00:04.2 on NUMA socket 0
EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device :00:04.3 on
NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device
:00:04.4 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL:
PCI device :00:04.5 on NUMA socket 0 EAL: probe driver: 8086:2021
rawdev_ioat EAL: PCI device :00:04.6 on NUMA socket 0 EAL: probe
driver: 8086:2021 rawdev_ioat EAL: PCI device :00:04.7 on NUMA socket 0
EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device :18:00.0 on
NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device
:18:00.1 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL:
PCI device :18:0a.0 on NUMA socket 0 EAL: probe driver: 8086:154c
net_i40e_vf EAL: using IOMMU type 1 (Type 1) EAL: PCI device :18:0a.1
on NUMA socket 0 EAL: probe driver: 8086:154c net_i40e_vf EAL: PCI device
:3d:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL:
PCI device :3d:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2
net_i40e EAL: PCI device :80:04.0 on NUMA socket 1 EAL: probe driver:
8086:2021 rawdev_ioat EAL: PCI device :80:04.1 on NUMA socket 1 EAL:
probe driver: 8086:2021 rawdev_ioat EAL: PCI device :80:04.2 on NUMA
socket 1 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device
:80:04.3 on NUMA socket 1 EAL: probe driver: 8086:2021 rawdev_ioat EAL:
PCI device :80:04.4 on NUMA socket 1 EAL: probe driver: 8086:2021
rawdev_ioat EAL: PCI device :80:04.5 on NUMA socket 1 EAL: probe
driver: 8086:2021 rawdev_ioat EAL: PCI device :80:04.6 on NUMA socket 1
EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device :80:04.7 on
NUMA socket 1 EAL: probe driver: 8086:2021 rawdev_ioat EAL: Failed to
hotplug add device EAL: Error - exiting with code: 1 Cause: vdev creation
failed:create_mp_ring_vdev:700

Best Regards,
Shu-hua, Liao


Re: Troubles with building of DPDK.RPM and meson

2021-10-12 Thread Ruslan R. Laishev

Installed meson i ninja from .RPM ...


Unpack DPDK-20.11.SRC.RPM, now I try to make DPDK.RPM (with the original 
 dpdk.spec from the DPDK 20.11 package), I get :


[root@sysman rpmbuild]# rpmbuild -ba SPECS/dpdk.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.r8Q2er
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf dpdk-20.11
+ /usr/bin/xz -dc /root/rpmbuild/SOURCES/dpdk-20.11.tar.xz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd dpdk-20.11
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.GjKyDK
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd dpdk-20.11
++ echo -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-m64 -mtune=generic -fcommon
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-m64 -mtune=generic -fcommon'

+ %set_build_flags
/var/tmp/rpm-tmp.GjKyDK: line 33: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.GjKyDK (%build)



What i missing now ?


Re: Troubles with building of DPDK.RPM and meson

2021-10-12 Thread Ruslan R. Laishev

On 12-10-2021 11:31, Thomas Monjalon wrote:

  Thanks for the answer.



12/10/2021 08:45, Ruslan R. Laishev:

Hello All!

   I have a small study task to make DPDK.RPM with the latest DPDK from
the git.


You should look at what is done in Fedora for the latest DPDK.

rpmfind.net return only binary kits for DPDK.
I'm need to make installation kit with building from sources.





   I use DPDK.SPEC from the latest .SRC.RPM kit as a template.


Not sure what is your reference.


 Latest .RPM with the source I found is:
dpdk-18.11.8-1.el7_8.src.rpm



Ok. Got DPDK.SPEC from 20.11 from Fedora site , so:

First run:
[root@sysman rpmbuild]# rpmbuild -ba SPECS/dpdk.spec
error: Failed build dependencies:
meson is needed by dpdk-2:20.11-2.el7.x86_64
[root@sysman rpmbuild]#

[root@sysman rpmbuild]# meson -v
0.59.2
[root@sysman rpmbuild]#

If I comment the "BuildRequires: meson" :

[root@sysman rpmbuild]# rpmbuild -ba SPECS/dpdk.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.rMiLfX
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf dpdk-20.11
+ /usr/bin/xz -dc /root/rpmbuild/SOURCES/dpdk-20.11.tar.xz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd dpdk-20.11
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.DIS5o0
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd dpdk-20.11
++ echo -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-m64 -mtune=generic -fcommon
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-m64 -mtune=generic -fcommon'
+ %meson --includedir=include/dpdk -Ddrivers_install_subdir=dpdk-pmds 
-Denable_docs=true -Dmachine=default --default-library=shared

/var/tmp/rpm-tmp.DIS5o0: line 32: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.DIS5o0 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.DIS5o0 (%build)
[root@sysman rpmbuild]#






Any ideas ?


Re: Troubles with building of DPDK.RPM and meson

2021-10-12 Thread Thomas Monjalon
12/10/2021 08:45, Ruslan R. Laishev:
> Hello All!
> 
>   I have a small study task to make DPDK.RPM with the latest DPDK from 
> the git.

You should look at what is done in Fedora for the latest DPDK.

>   I use DPDK.SPEC from the latest .SRC.RPM kit as a template.

Not sure what is your reference.