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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 9B7BAC7618F for ; Mon, 22 Jul 2019 17:05:03 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 2C60F21901 for ; Mon, 22 Jul 2019 17:05:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="lNyIhWhW"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="qirhKba3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C60F21901 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net 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 C2E681BF35; Mon, 22 Jul 2019 19:05:01 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 121731BF19; Mon, 22 Jul 2019 19:05:00 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6FDD94FB; Mon, 22 Jul 2019 13:04:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 22 Jul 2019 13:04:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=CjM1KYJ4yHuORcY7bjVTh92HVc/wBo7hk7EohXSUeyU=; b=lNyIhWhW831P eUYE2pcjQzMDxbww+hR3lTgt0AwhCyT1Hv+6xzh0TjsJo/mLDl9rTH41iDjs5Xc3 VOEBY3Ri7mMI+Rq4lI/Fb1iQ1iDUBPm+yQ3gcbJVZ8xXnKuTeDx0Wcd3TTif64nQ KXDNKT6KI5YnbylP08kPxLJwgzCorms= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=CjM1KYJ4yHuORcY7bjVTh92HVc/wBo7hk7EohXSUe yU=; b=qirhKba3nYK9Vpn/mGb34ap+it+Y2DhZTNBmj9crZuMUb1LfnkmcQ9reT ze0iIj7krFeWm+BmeubYtp8IIE+wQJlqZa68rE6mDN/hx15gBHwvgN9BeTTNaPpM RMFdIhrt28hP5JIuOFRqIMbd9Vqeh/SjLD2vuCOtW8RWGK9DTWp7sdFBKMgp0ZuQ sH3xLdlJJERNkWAiFy9SwjcupHtOL5nhhUjhyGjmKjy2EJQ8CmWU7I3PliWNN9Ax s9r+cSttCwxl4bbCerSTDXgqJhDV5jSP78jg92cOddJI5F0xJuwyNqXGHhIpNpjw MoR9I/2SYQIl6nwtPNnP9TQT8+zZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrjeeggdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecukfhppeejjedrudefgedr vddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjh grlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8BF1C8005A; Mon, 22 Jul 2019 13:04:56 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: Bruce Richardson , dev@dpdk.org, stable@dpdk.org Date: Mon, 22 Jul 2019 19:04:55 +0200 Message-ID: <3107061.JzsCpgzbfO@xps> In-Reply-To: <20190722094323.613cb090@xps13> References: <20190715234136.3526-1-stephen@networkplumber.org> <20190722090610.GA289@bricha3-MOBL.ger.corp.intel.com> <20190722094323.613cb090@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 22/07/2019 18:43, Stephen Hemminger: > On Mon, 22 Jul 2019 10:06:11 +0100 > Bruce Richardson wrote: > > On Mon, Jul 22, 2019 at 09:38:27AM +0200, Thomas Monjalon wrote: > > > 19/07/2019 22:55, Stephen Hemminger: > > > > The root cause is that recent gcc won't run constructor on unused libraries. > > > > Testing a patch to take --as-needed off of PCI library. > > > > > > > > See: https://stackoverflow.com/questions/11631161/force-to-link-against-unused-shared-library > > > > > > The constructor is run when calling dlopen, right? > > > > > > Note: dlopen with -d is a feature. > > > The original idea was to be able to specify which driver we want to use. > > > If we want an automatic dlopen, like modprobe, then we need more scripts. > > > But I understand you are against the whole dlopen idea. > > > > This issue is more of a problem for development systems where we EAL path > > is not really usable for finding the drivers. For a properly deployed > > system where we use DPDK installed to /usr/local or /usr, the EAL PMD path > > will be correctly configured and properly probe all drivers. > > The problem is that bus drivers register themselves in constructors and > these construtors are not run with as-needed. Are the constructors run on dlopen of the bus driver?