DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Rik Huijzer <rikhuijzer@pm.me>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Shared library build is unable to parse device
Date: Thu, 9 May 2019 09:58:39 +0100	[thread overview]
Message-ID: <20190509085839.GA57@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <-YFvQvMaxQq0MXa5RKGQJgs96P-qkhJrVlpZS5FE8ahh--CvfPbbxg6dS8kmBC6KxR_yFv44LlS7EKM8_jCAlrds-SyH18fHAqX9LedEuj8=@pm.me>

On Wed, May 08, 2019 at 08:24:35AM +0000, Rik Huijzer wrote:
> Hi,
> 
> Amazed by the reported processing speed of DPDK, I'm trying to use DPDK as a shared library. Running the rxtx_callbacks (and possibly other) example(s) it exits on `unable to parse device` when enabling CONFIG_RTE_BUILD_SHARED_LIB. If this behavior is as expected for some reason I'm curious for some pointers into a direction I can take to have a shared library which can be called from another application.
> 
> The error can be reproduced as follows on Ubuntu 18.04.2.
> 1. Download DPDK 18.05 and 19.02 and use these to fill the folders dpdk-18.05, dpdk-18.05-shared, dpdk-19.02, and dpdk-19.02-shared. We refer to these folders as $RTE_SDK.
> 2. For all folders `make config T=x86_64-native-linuxapp-gcc` and `sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config`
> 3. For both shared folders enable CONFIG_RTE_BUILD_SHARED in build/config.
> 4. For both shared folders add $RTE/build/lib to /etc/ld.so.conf.d/dpdk.conf and update libraries by reboot or sudo ldconfig.
> 5. For all folders `cd $RTE_SDK/build/examples/rxtx_callbacks/build/app` and `sudo ./rxtx_callbacks --vdev=eth_pcap0,iface=lo --vdev=eth_pcap1,iface=eno1` where one might need to replace the iface depending on the system.
> 
> When doing step 5 both shared DPDK instances will fail with the error `unable to parse device` while the other two start processing packages.
>
For shared library builds, the driver libraries are not explicitly linked
into the apps, so you need to either:
1. have the drivers put into the folder given by EAL_PMD_PATH during the
   build so that EAL finds and loads them automatically.
2. Use the -d flag at runtime to tell EAL to load a driver or a folder of
   drivers on init.

Regards,
/Bruce

  parent reply	other threads:[~2019-05-09  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  8:24 Rik Huijzer
2019-05-08  8:24 ` Rik Huijzer
2019-05-09  8:58 ` Bruce Richardson [this message]
2019-05-09  8:58   ` Bruce Richardson

Reply instructions:

You may reply publicly 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=20190509085839.GA57@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=rikhuijzer@pm.me \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).