From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 039D3A0096 for ; Thu, 9 May 2019 10:58:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BF0024C90; Thu, 9 May 2019 10:58:45 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2901149E0 for ; Thu, 9 May 2019 10:58:43 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 01:58:42 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.251.93.144]) by fmsmga005.fm.intel.com with SMTP; 09 May 2019 01:58:40 -0700 Received: by (sSMTP sendmail emulation); Thu, 09 May 2019 09:58:40 +0100 Date: Thu, 9 May 2019 09:58:39 +0100 From: Bruce Richardson To: Rik Huijzer Cc: "dev@dpdk.org" Message-ID: <20190509085839.GA57@bricha3-MOBL.ger.corp.intel.com> References: <-YFvQvMaxQq0MXa5RKGQJgs96P-qkhJrVlpZS5FE8ahh--CvfPbbxg6dS8kmBC6KxR_yFv44LlS7EKM8_jCAlrds-SyH18fHAqX9LedEuj8=@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: <-YFvQvMaxQq0MXa5RKGQJgs96P-qkhJrVlpZS5FE8ahh--CvfPbbxg6dS8kmBC6KxR_yFv44LlS7EKM8_jCAlrds-SyH18fHAqX9LedEuj8=@pm.me> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] Shared library build is unable to parse device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190509085839.unjbJlDLlo3rsbpxBu-n4KoZ9JFYliGpvjyNydMYLok@z> 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