DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 333] PCI devices not found when DPDK is linked as dynamic libraries
@ 2019-07-19 20:43 bugzilla
  2019-07-19 23:17 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2019-07-19 20:43 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=333

            Bug ID: 333
           Summary: PCI devices not found when DPDK is linked as dynamic
                    libraries
           Product: DPDK
           Version: 19.08
          Hardware: All
                OS: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

If DPDK is configured with RTE_SHARED_LIB=y then applications are not loading
the required PCI library and therefore devices are not found.

Example is that l3fwd works if linked statically but fails if built with shared
libraries.

# ./examples/l3fwd/build/l3fwd -n4 -l0-3 -w 02:00.0
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: failed to parse device "02:00.0"
EAL: Unable to parse device '02:00.0'
EAL: Error - exiting with code: 1
   Cause: Invalid EAL parameters  

The string 02:00.0 should have been parsed by PCI library and that will find
the device. but since library is not pulled in, the device is not found.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* Re: [dpdk-dev] [Bug 333] PCI devices not found when DPDK is linked as dynamic libraries
  2019-07-19 20:43 [dpdk-dev] [Bug 333] PCI devices not found when DPDK is linked as dynamic libraries bugzilla
@ 2019-07-19 23:17 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2019-07-19 23:17 UTC (permalink / raw)
  To: bugzilla; +Cc: dev

On Fri, 19 Jul 2019 20:43:04 +0000
bugzilla@dpdk.org wrote:

> https://bugs.dpdk.org/show_bug.cgi?id=333
> 
>             Bug ID: 333
>            Summary: PCI devices not found when DPDK is linked as dynamic
>                     libraries
>            Product: DPDK
>            Version: 19.08
>           Hardware: All
>                 OS: Linux
>             Status: UNCONFIRMED
>           Severity: critical
>           Priority: Normal
>          Component: core
>           Assignee: dev@dpdk.org
>           Reporter: stephen@networkplumber.org
>   Target Milestone: ---
> 
> If DPDK is configured with RTE_SHARED_LIB=y then applications are not loading
> the required PCI library and therefore devices are not found.
> 
> Example is that l3fwd works if linked statically but fails if built with shared
> libraries.
> 
> # ./examples/l3fwd/build/l3fwd -n4 -l0-3 -w 02:00.0
> EAL: Detected 8 lcore(s)
> EAL: Detected 1 NUMA nodes
> EAL: failed to parse device "02:00.0"
> EAL: Unable to parse device '02:00.0'
> EAL: Error - exiting with code: 1
>    Cause: Invalid EAL parameters  
> 
> The string 02:00.0 should have been parsed by PCI library and that will find
> the device. but since library is not pulled in, the device is not found.
> 

There are two levels of problems here.

#1 All the bus drivers work by registering themselves in the bus subsystem.
But with the --as-needed flag the RTE_INIT() that registers is not run on
PCI (or other bus) when built as shared library. This is resolved by flag
changes in mk.rteapp.mk.

#2 All the PMD drivers have the same problem. Even though they get built,
their RTE_INIT does not get called either since they are not on the application
link line.

#3 Similar problems with mempools.

Not sure if the real answer is to always link application with the
libdpdk.so (combined group) instead of the laundry list of libraries.

Lastly, why is shared library build not tested as part of the CI
infrastructure?

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

end of thread, other threads:[~2019-07-19 23:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 20:43 [dpdk-dev] [Bug 333] PCI devices not found when DPDK is linked as dynamic libraries bugzilla
2019-07-19 23:17 ` Stephen Hemminger

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).