DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: "Shubhachint, Chaitanya" <Chaitanya.Shubhachint@netscout.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] DPDK Shared lib: No Ethernet ports
Date: Fri, 7 Sep 2018 14:22:29 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B07268C8AF@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <DM5PR0101MB2954CC60A1266503E8B4139C87000@DM5PR0101MB2954.prod.exchangelabs.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shubhachint,
> Chaitanya
> Sent: Friday, September 7, 2018 3:18 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] DPDK Shared lib: No Ethernet ports
> 
> Hello,
> 
> I recently started working with DPDK and gone through the initial steps of
> getting source code installed and trying out few examples. To integrate
> DPDK with our product, I need to build the share-lib version of DPDK.
> I run into an issue when I build DPDK as shared, I don't see this issue
> when DPDK is built as static. DPDK built with default configuration, I can
> run the examples and get expected results. When built as shared, EAL
> detects no Ethernet ports.
> 
> I am building shared-lib version using steps below:
> . switch the CONFIG_RTE_BUILD_SHARED_LIB to y in the config/common_base .
> make config T=x86_64-native-linuxapp-gcc . make install T=x86_64-native-
> linuxapp-gcc . export RTE_SDK=$HOME/dpdk-18.08 . export RTE_TARGET=x86_64-
> native-linuxapp-gcc
> . build examples.
> . Set LD_LIBRARY_PATH to point to $HOME/dpdk-18.08/ x86_64-native-
> linuxapp-gcc/lib
> 
> I am using Intel I350 Quad port NIC, and have switched to uio_pci_generic
> driver => Network devices using DPDK-compatible driver
> ============================================
> 0000:06:00.0 'I350 Gigabit Network Connection 1521' drv=uio_pci_generic
> unused=igb
> 0000:06:00.1 'I350 Gigabit Network Connection 1521' drv=uio_pci_generic
> unused=igb
> 0000:06:00.2 'I350 Gigabit Network Connection 1521' drv=uio_pci_generic
> unused=igb
> 0000:06:00.3 'I350 Gigabit Network Connection 1521' drv=uio_pci_generic
> unused=igb
> 
> When I run any examples, I get error 'No Ethernet ports'.
> 
> root:l2fwd$./build/l2fwd
> EAL: Detected 6 lcore(s)
> EAL: Detected 1 NUMA nodes
> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
> EAL: No free hugepages reported in hugepages-1048576kB
> EAL: Probing VFIO support...
> MAC updating enabled
> EAL: Error - exiting with code: 1
>   Cause: No Ethernet ports - bye
> 
> Interestingly, same code base built with 'CONFIG_RTE_BUILD_SHARED_LIB=n'
> works just fine. The ports get detected correctly and I can run all the
> examples and applications.
> 
> Your help is appreciated.

With shared library builds, the drivers are not linked in automatically. You
need to explicitly load them via "-d" EAL flag - either individually or by
passing in the path to a directory of drivers which can be loaded. See also
in the build config the setting "CONFIG_RTE_EAL_PMD_PATH" which can be used
to set a default search path for loading drivers.

Regards,
/Bruce

  reply	other threads:[~2018-09-07 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 14:18 Shubhachint, Chaitanya
2018-09-07 14:22 ` Richardson, Bruce [this message]
2018-09-07 17:11   ` Shubhachint, Chaitanya
2018-09-10 10:46     ` 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=59AF69C657FD0841A61C55336867B5B07268C8AF@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=Chaitanya.Shubhachint@netscout.com \
    --cc=dev@dpdk.org \
    /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).