[dpdk-stable] [PATCH] pci: fix missing pci bus with shared library build
Stephen Hemminger
stephen at networkplumber.org
Tue Jul 16 02:16:16 CEST 2019
On Mon, 15 Jul 2019 16:41:36 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:
> 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 at dpdk.org
> Signed-off-by: Stephen Hemminger <stephen at 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
This only seems to happen on 18.11 and if configuration is reduced.
More information about the stable
mailing list