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 552E9A0613 for ; Sat, 20 Jul 2019 01:17:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02F54374E; Sat, 20 Jul 2019 01:17:35 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by dpdk.org (Postfix) with ESMTP id 9F17F325F for ; Sat, 20 Jul 2019 01:17:33 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id az7so16286482plb.5 for ; Fri, 19 Jul 2019 16:17:33 -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=sUBkMCHquWy208eMWqCLz9OxxiftcI7/E1kKNPqyhNc=; b=b+6IvCtVAJwEeCfcZH9hfvhS2ZnXgEDe4qIwkWn24e69WzPa3GTZijQDM0IJnrfhsm Ug3La3U1G4D9DaGl8i76m2oiIjj9zObz4/eMYSMnYbF7Bv3BAB6bmLizKKqcl0uTVqTY sLldUezB6En2/NzbgjhfzC+qZye+2wCtyHWIrhi59CjXV/SRo1Q1a+lUXlE9aZsHdU+A LxYdsxN5PFR7dghTdtuMBg5h0KCHg5SAz8XemoKobj71A4jd+Bp3BvDT+JwdQ70APFmF a2Vkmdm6sury4xeq3NgHrr4TDYCRd3WTECyqGnse9cmyOQD57SXz0o/ZsoH3x49K0D2c y6IA== 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=sUBkMCHquWy208eMWqCLz9OxxiftcI7/E1kKNPqyhNc=; b=O3uLCEataKY3Kais3GS8o/RHiznTBdKru7gDYKP7tvll1dpmU0IYxYS2Bf28PblmuZ g0mKuz1arWJUOZaN/jr7ExPa29zNgYpKLYLB5g9h+Oi9WCMTqLPaoW51uwDY05ShqYv/ N8FHvqmzpchwwwQsUyhQy0ky5KJRvj0R61DpCfR6wFbpXoCAEFtLoGauJObpEGj4JPXJ dLqBmN2zhFPFM+M6B1eR0uPZmOgvIWvMo3rwy2EfqqOs1zCLR1ilmNjN3Am7LP7Gv2HM GkADcmSMViljkuqheqBjpBe8YeMrdWWbEU3jxAOd5S6bZZepZWc+rM5gZL4KQQ+j/awG RkGg== X-Gm-Message-State: APjAAAUMydODI35MuDqGjiIdJWbYkrLwd2bVdfNnqMhCv87FFlW/6QtR THDvvY9ZCNKlHg0DlHCwBrGsIVyO X-Google-Smtp-Source: APXvYqzkxQrfx/kpyMFE/ikqTH2nzF04dxGdustQCPAgyEr/nJCdYRsUmHc+1/ZlB2CFKJf6Td5xwQ== X-Received: by 2002:a17:902:b70e:: with SMTP id d14mr59013798pls.309.1563578252694; Fri, 19 Jul 2019 16:17:32 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b26sm36389892pfo.129.2019.07.19.16.17.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 19 Jul 2019 16:17:32 -0700 (PDT) Date: Fri, 19 Jul 2019 16:17:24 -0700 From: Stephen Hemminger To: bugzilla@dpdk.org Cc: dev@dpdk.org Message-ID: <20190719161724.20789f1b@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [Bug 333] PCI devices not found when DPDK is linked as dynamic libraries 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 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?