DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: thomas@monjalon.net
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build
Date: Mon, 15 Jul 2019 16:41:36 -0700	[thread overview]
Message-ID: <20190715234136.3526-1-stephen@networkplumber.org> (raw)

If DPDK is built as a shared library, then any application linked
with rte.app.mk will not find any PCI devices. When the application
is started no ethernet devices are found.

This is because the link order of libraries on the command line matters.
And PCI is before EAL. That causes there to be no dependency on PCI
so linker ignores linking the library. 
Swapping the order fixes this.

Fixes: c752998b5e2e ("pci: introduce library and driver")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 mk/rte.app.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index a277c808ed8e..470b92e4d73e 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -90,8 +90,8 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_STACK)          += -lrte_stack
 _LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING)   += -lrte_mempool_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_OCTEONTX2_MEMPOOL) += -lrte_mempool_octeontx2
 _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PCI)            += -lrte_pci
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PCI)            += -lrte_pci
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
-- 
2.20.1


             reply	other threads:[~2019-07-15 23:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 23:41 Stephen Hemminger [this message]
2019-07-16  0:16 ` Stephen Hemminger
2019-07-16  0:19 ` Stephen Hemminger
2019-07-16  8:46   ` Bruce Richardson
2019-07-16 14:46     ` Stephen Hemminger
2019-07-19 18:11     ` Stephen Hemminger
2019-07-19 20:39     ` Stephen Hemminger
2019-07-19 20:55     ` Stephen Hemminger
2019-07-22  7:38       ` Thomas Monjalon
2019-07-22  9:06         ` Bruce Richardson
2019-07-22 16:43           ` Stephen Hemminger
2019-07-22 17:04             ` Thomas Monjalon
2019-07-22 17:13               ` Stephen Hemminger
2019-07-22 17:31                 ` Thomas Monjalon
2019-07-22 18:34                   ` Stephen Hemminger
2019-07-23  7:59                     ` Thomas Monjalon
2019-07-23 18:29                       ` Stephen Hemminger
2019-07-23 18:35                         ` Thomas Monjalon
2019-07-22 18:53                   ` Stephen Hemminger
2019-07-23 12:30                     ` Bruce Richardson
2019-07-23 18:11                       ` Stephen Hemminger
2019-07-24  8:56                         ` Bruce Richardson
2019-07-23 18:47                       ` Stephen Hemminger

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=20190715234136.3526-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).