DPDK usage discussions
 help / color / mirror / Atom feed
* Troubles using pdump to capture the packets
@ 2021-10-13  6:10 廖書華
  2021-10-13 16:55 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: 廖書華 @ 2021-10-13  6:10 UTC (permalink / raw)
  To: users

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 0x800008001 -n2
--iova-mode=pa --socket-mem=8192 --socket-limit=8192 --proc-type=auto
--file-prefix wls_1 -w 0000: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 0000: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 10000
Mbps - full-duplex EAL: PCI device 0000: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
10000 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 0000:00:04.0 on NUMA socket 0 EAL: probe driver: 8086:2021
rawdev_ioat EAL: PCI device 0000:00:04.1 on NUMA socket 0 EAL: probe
driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.2 on NUMA socket 0
EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.3 on
NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device
0000:00:04.4 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL:
PCI device 0000:00:04.5 on NUMA socket 0 EAL: probe driver: 8086:2021
rawdev_ioat EAL: PCI device 0000:00:04.6 on NUMA socket 0 EAL: probe
driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.7 on NUMA socket 0
EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:18:00.0 on
NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device
0000:18:00.1 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL:
PCI device 0000: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 0000:18:0a.1
on NUMA socket 0 EAL: probe driver: 8086:154c net_i40e_vf EAL: PCI device
0000:3d:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL:
PCI device 0000:3d:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2
net_i40e EAL: PCI device 0000:80:04.0 on NUMA socket 1 EAL: probe driver:
8086:2021 rawdev_ioat EAL: PCI device 0000:80:04.1 on NUMA socket 1 EAL:
probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:80:04.2 on NUMA
socket 1 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device
0000:80:04.3 on NUMA socket 1 EAL: probe driver: 8086:2021 rawdev_ioat EAL:
PCI device 0000:80:04.4 on NUMA socket 1 EAL: probe driver: 8086:2021
rawdev_ioat EAL: PCI device 0000:80:04.5 on NUMA socket 1 EAL: probe
driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:80:04.6 on NUMA socket 1
EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000: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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Troubles using pdump to capture the packets
  2021-10-13  6:10 Troubles using pdump to capture the packets 廖書華
@ 2021-10-13 16:55 ` Stephen Hemminger
  2021-10-14  1:28   ` 廖書華
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2021-10-13 16:55 UTC (permalink / raw)
  To: 廖書華; +Cc: users

On Wed, 13 Oct 2021 14:10:17 +0800
廖書華 <sim860927@gmail.com> wrote:

> 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”

The pdump support requires the pcap PMD to be enabled in the build.
What is your DPDK config?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Troubles using pdump to capture the packets
  2021-10-13 16:55 ` Stephen Hemminger
@ 2021-10-14  1:28   ` 廖書華
  2021-10-14  9:51     ` Pattan, Reshma
  0 siblings, 1 reply; 5+ messages in thread
From: 廖書華 @ 2021-10-14  1:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users, 林庭安

Dear Stephen,

Thanks for your response !!!
Yes, I already set *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and
*CONFIG_RTE_LIBRTE_PDUMP=y *in the file "dpdk-19.11/config/common_base"
then build DPDK.
Also, in the files "dpdk-19.11/x86_64-native-linuxapp-icc/.config" and
"dpdk-19.11/x86_64-native-linuxapp-icc/.config.orig", they also show that
*CONFIG_RTE_LIBRTE_PMD_PCAP=y *and *CONFIG_RTE_LIBRTE_PDUMP=y.*

It seems that it already enabled pcap PMD of DPDK.
Do you have other suggestions ?


Best Regards,
Shu-hua, Liao


Stephen Hemminger <stephen@networkplumber.org> 於 2021年10月14日 週四 上午12:55寫道:

> On Wed, 13 Oct 2021 14:10:17 +0800
> 廖書華 <sim860927@gmail.com> wrote:
>
> > 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”
>
> The pdump support requires the pcap PMD to be enabled in the build.
> What is your DPDK config?
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Troubles using pdump to capture the packets
  2021-10-14  1:28   ` 廖書華
@ 2021-10-14  9:51     ` Pattan, Reshma
       [not found]       ` <CANq=q409Gh5RYrSTvVbk3w-BKqjODDRmeFiFbXGdRngqDVvPnA@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Pattan, Reshma @ 2021-10-14  9:51 UTC (permalink / raw)
  To: 廖書華, Stephen Hemminger
  Cc: users, 林庭安



> -----Original Message-----
> From: 廖書華 <sim860927@gmail.com>


> Yes, I already set *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and
> *CONFIG_RTE_LIBRTE_PDUMP=y *in the file "dpdk-
> 19.11/config/common_base"
> then build DPDK.
> Also, in the files "dpdk-19.11/x86_64-native-linuxapp-icc/.config" and "dpdk-
> 19.11/x86_64-native-linuxapp-icc/.config.orig", they also show that
> *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and *CONFIG_RTE_LIBRTE_PDUMP=y.*
> 
> It seems that it already enabled pcap PMD of DPDK.
> Do you have other suggestions ?

Hi,

Few options you can double check
1)Make sure your primary application is calling rte_pdump_init()/ret_pudmp_uninit() to initialize/uninitialize the pdump library.
2)If you are using a shared library build,   double check you are  linking pcap pmd properly in primary build as explained in below link
https://www.mail-archive.com/users@dpdk.org/msg05039.html
https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device
3)If you are passing any pci device using  eal "-w" option to primary,  try to pass the same device to secondary also using "-w" option . 

If you still see the issue please paste the full primary and secondary application run log with command that you are running.
Also what kind of build you are using.

Thanks,
Reshma
  

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Troubles using pdump to capture the packets
       [not found]       ` <CANq=q409Gh5RYrSTvVbk3w-BKqjODDRmeFiFbXGdRngqDVvPnA@mail.gmail.com>
@ 2021-10-15 10:33         ` Pattan, Reshma
  0 siblings, 0 replies; 5+ messages in thread
From: Pattan, Reshma @ 2021-10-15 10:33 UTC (permalink / raw)
  To: 廖書華
  Cc: Stephen Hemminger, users, 林庭安


From: 廖書華 <sim860927@gmail.com>
Sent: Friday, October 15, 2021 5:16 AM
To: Pattan, Reshma <reshma.pattan@intel.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>; users@dpdk.org; 林庭安 <lingwanjae@gmail.com>
Subject: Re: Troubles using pdump to capture the packets

>>Dear Reshma,

>>Thanks for your kind response ! Unfortunately, it still can't work.


Also, could you please paste me the lbpcap-devel package version on your system.

Thanks,
Reshma

Pattan, Reshma <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>> 於 2021年10月14日 週四 下午5:52寫道:


> -----Original Message-----
> From: 廖書華 <sim860927@gmail.com<mailto:sim860927@gmail.com>>


> Yes, I already set *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and
> *CONFIG_RTE_LIBRTE_PDUMP=y *in the file "dpdk-
> 19.11/config/common_base"
> then build DPDK.
> Also, in the files "dpdk-19.11/x86_64-native-linuxapp-icc/.config" and "dpdk-
> 19.11/x86_64-native-linuxapp-icc/.config.orig", they also show that
> *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and *CONFIG_RTE_LIBRTE_PDUMP=y.*
>
> It seems that it already enabled pcap PMD of DPDK.
> Do you have other suggestions ?

Hi,

Few options you can double check
1)Make sure your primary application is calling rte_pdump_init()/ret_pudmp_uninit() to initialize/uninitialize the pdump library.
2)If you are using a shared library build,   double check you are  linking pcap pmd properly in primary build as explained in below link
https://www.mail-archive.com/users@dpdk.org/msg05039.html
https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device
3)If you are passing any pci device using  eal "-w" option to primary,  try to pass the same device to secondary also using "-w" option .

If you still see the issue please paste the full primary and secondary application run log with command that you are running.
Also what kind of build you are using.

Thanks,
Reshma

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-15 10:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  6:10 Troubles using pdump to capture the packets 廖書華
2021-10-13 16:55 ` Stephen Hemminger
2021-10-14  1:28   ` 廖書華
2021-10-14  9:51     ` Pattan, Reshma
     [not found]       ` <CANq=q409Gh5RYrSTvVbk3w-BKqjODDRmeFiFbXGdRngqDVvPnA@mail.gmail.com>
2021-10-15 10:33         ` Pattan, Reshma

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git