From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6D93EA0471 for ; Tue, 16 Jul 2019 02:19:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E96562C6A; Tue, 16 Jul 2019 02:19:21 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 70E1523D for ; Tue, 16 Jul 2019 02:19:20 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id n9so2273192pgc.1 for ; Mon, 15 Jul 2019 17:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yEBVuHYqEv6ethDMjS6sIhYQOCoXYN5ilPX9bVQo/bk=; b=tIBQMIKnqN7/vMA+BjcgNVhb/ksC6Gbu+3fMkAH5/iEIuoDJghfaK73k5j30nYgA3k L+ZrmST/QqMXc1hJ7LdSmLSGEq4oroyEtY2TrSiLECdsr5hTy4/Hc2F5pRMhMJqYvJcp pB/zVse0iOGVo+RBelBIxPvMgeyJLtM3e+vShv+touhD74u1VaECCwNzHFnrrnHoGPCW DhYDFSkhUni6hRmG6naK7BTrPiK3xuDO+bD3KSFMxXD/cMb7pAvG2NxXpWz/jH1865dI Un3JtzituaPLz7L+2Ow4cHvTZSD1fWJA4vwK+A1Z9RY71ioYjcBHNWWYffxzs7ASPaL1 zo/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yEBVuHYqEv6ethDMjS6sIhYQOCoXYN5ilPX9bVQo/bk=; b=lGLaohWILo73ZeTfzm6R5fOmJZN/Tb2HfpDOZE7AoFTcTgulATtwXBLanRSnus7VfA V23lqRCTA3CZ9DkXwibmCe1Vwjklbmq02jX1zUxU9mOwRr+tCI/XCsDZXjx2lWxVknsR 9xAc09bRDTDj3igWJ4FM44x1SZ6pXblzBa/HuF1zBzteivgEaH/uEqBoclzaLkWvXwTq huxYHsMsuOTIKdNy0XyKB723qcNqpS7frE6fZpCqlmL+Hx1x2w9Fq4XE2QohFqkxAnTl fiWiLW4Hz1tQtf8ma8cpYpvE6m3rXjiXaWJo1JOh/rd8tTgIIcOPeIUiOb97u50r0AGV lpoQ== X-Gm-Message-State: APjAAAX20ltnVmzAwQtu0jsQvtSbdcAvFlF1KPFxNKd6e2LfPsuU1sMn kzRjK8Civ9zdsolW4rInVFez75Yi X-Google-Smtp-Source: APXvYqxvSDkmiingJCztt0ShzZQKCyrpXm5s++m6RaIRIZHkfLdIzY64pKBZBrpk2FakHi/VvLBH0Q== X-Received: by 2002:a17:90a:8c06:: with SMTP id a6mr32959837pjo.45.1563236359557; Mon, 15 Jul 2019 17:19:19 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g62sm19163999pje.11.2019.07.15.17.19.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 15 Jul 2019 17:19:19 -0700 (PDT) Date: Mon, 15 Jul 2019 17:19:12 -0700 From: Stephen Hemminger To: thomas@monjalon.net Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20190715171912.7c179f43@hermes.lan> In-Reply-To: <20190715234136.3526-1-stephen@networkplumber.org> References: <20190715234136.3526-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build 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" On Mon, 15 Jul 2019 16:41:36 -0700 Stephen Hemminger 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@dpdk.org > Signed-off-by: Stephen Hemminger > --- > 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 It still happens with 19.08. Testpmd works but only because it is linked with so many things. But l3fwd fails... # ./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