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 07FEEA0471 for ; Tue, 16 Jul 2019 02:19:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D01D923D; Tue, 16 Jul 2019 02:19:21 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 6C83F2C18 for ; Tue, 16 Jul 2019 02:19:20 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id g15so8501767pgi.4 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=G40Kq8ArWMTNIYc4m346CnCwoFuM5BFbNPNAy5XBmBtf+TyxJs+nCew/bnXp4XXqj+ qMfHMM+LYCn6J4nucIh95Hl8ArFnLD++BKilx/QQpSFFuC0MRNh3fD+y0NY1xV1zar12 N70olOjb+x8UwX5UF+gi8j84sCY5fatunudeHl6cp9SUu8YYuXBEVhiYSHwFRRXgnLdv K48h50eleH//0qXP21oXkMoa7OeDMpPM8J/1oo8erJMiIFbWXdTez1oRdbl+OTWk/e9j 8Vi8Uz6Dq7R+wrWmK6bIOYWhOW7iRMcSeOLOyFMbBnoG2nBgEe54nECslWNuRA25Il41 VYXg== X-Gm-Message-State: APjAAAWS/eHdxXHkIxstw39e1NYU/KO8y3lNIdC0Dvx/gZA6tAcgWuOC HUns8tX3vcg0cAZzwn5fXt8= 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-stable] [PATCH] pci: fix missing pci bus with shared library build X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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