From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F382C7618F for ; Fri, 19 Jul 2019 23:17:36 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 1F8822089C for ; Fri, 19 Jul 2019 23:17:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="b+6IvCtV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F8822089C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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?