DPDK usage discussions
 help / color / Atom feed
From: "Varghese, Vipin" <vipin.varghese@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Dikshant Chitkara <dchitkara@Airspan.com>
Cc: "users@dpdk.org" <users@dpdk.org>, "dev@dpdk.org" <dev@dpdk.org>,
	"Amir Ilan" <ailan@Airspan.com>,
	Veeresh Patil <vpatil@Airspan.com>
Subject: Re: [dpdk-users] [dpdk-dev] DPDK PDUMP Issue
Date: Wed, 22 Jul 2020 04:08:02 +0000
Message-ID: <MN2PR11MB38235F654735AD7CB84C1F6590790@MN2PR11MB3823.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200714092902.31e95f83@hermes.lan>

Snipped

> Dikshant Chitkara <dchitkara@Airspan.com> wrote:
> 
> > Hi Team,
> >
> > We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if
> you can help us in this regard.
> >
> > This issue is specific to DPDK 19.05 version or may  be newer versions and
> was not found on DPDK 18.08 version.
> >
> > The issue is that when we built DPDK in shared library mode and try to run
> PDUMP we get following error on PDUMP console:
> >
> > EAL: Failed to hotplug add device
> > EAL: Error - exiting with code: 1
> >   Cause: vdev creation failed
> >
> > On Debugging above error message, I found that inside rte_dev_probe()
> function in the file  lib/librte_eal/common/eal_common_dev.c , req.result = -
> 14 which is non-zero value and points to enum EFAULT (Bad address) value,
> thus leading to above error.
> >
> > However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue
> and it worked fine.
> >
> > DPDK was built with following flags set in config/common_base file:
> >
> > CONFIG_RTE_LIBRTE_PMD_PCAP=y
> > CONFIG_RTE_LIBRTE_PDUMP=y
> >
> > I ran PDUMP with testpmd as primary application and was trying to send
> some traffic on the Ethernet dpdk port using testpmd and capture it using
> pdump.
> >
> > Attached are the logs for both testpmd and pdump in both DPDK19_05 and
> DPDK_18_08 version for your reference.
> >
> > Let us know if you can help in this regard.
> >
> > Thanks,
> > Dikshant
> >
> 
> Pdump runs as secondary process, what is your primary process.
> Is the secondary process using the same exact versions of DPDK and libraries as
> the primary process?
> The secondary process needs access to the same devices and drivers as the
> primary process to work.

Based on the log files shared, I have made assumptions as

1. Primary: testpmd
2. DPDK version: 19.05
3. SHARED LIB in .config: yes
4. export LD_LIBRARY_PATH: yes

Using arguments passed in primary, I faced error
```
EAL: Error - exiting with code: 1
  Cause: Creation of mbuf pool for socket 0 failed: Invalid argument

  Cause: Mempool creation failed: Invalid argument
```

Hence had to modify with ` -d librte_mempool_ring.so`.  Using arguments passed in secondary, I faced similar error too. 

With these corrections, I am able to get similar error shared as
```
EAL: failed to parse device "vdev:net_pcap_tx_0"
EAL: Failed to hotplug add device on primary
EAL: Error - exiting with code: 1
  Cause: vdev creation failed
```

Checking the testpmd Makefile, it is narrowed down to missing PCAP_PMD build factor. I rebuild testpmd with ` LD_FLAGS="-lrte_pmd_pcap" make` and re-ran the same. With this I can get it working properly. 

Ideally there should had been an entry in Makefile as 
```
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
LDLIBS += -lrte_pmd_pcap
endif
```

reference: This is similar to the error and solution provided in ` https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device/62869287#62869287`



  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  8:40 [dpdk-users] " Dikshant Chitkara
2020-07-14 16:29 ` [dpdk-users] [dpdk-dev] " Stephen Hemminger
2020-07-22  4:08   ` Varghese, Vipin [this message]
2020-07-28 14:51     ` Dikshant Chitkara
2020-07-28 16:23       ` Stephen Hemminger
2020-07-28 16:41         ` Dikshant Chitkara
2020-07-28 17:03           ` Stephen Hemminger
2020-07-28 17:08             ` Dikshant Chitkara
2020-07-29  0:59       ` Varghese, Vipin
2020-07-29  9:14         ` Dikshant Chitkara
2020-07-29  9:51           ` Varghese, Vipin
2020-07-29  9:56             ` Varghese, Vipin
2020-07-29 14:08             ` Dikshant Chitkara
2020-07-30  2:35               ` Varghese, Vipin

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB38235F654735AD7CB84C1F6590790@MN2PR11MB3823.namprd11.prod.outlook.com \
    --to=vipin.varghese@intel.com \
    --cc=ailan@Airspan.com \
    --cc=dchitkara@Airspan.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    --cc=vpatil@Airspan.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

Archives are clonable:
	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


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


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