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 EF29BA046B for ; Mon, 22 Jul 2019 19:20:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B760C1BF8D; Mon, 22 Jul 2019 19:20:44 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id A49001BEB2 for ; Mon, 22 Jul 2019 19:20:41 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id 4so12486499pld.10 for ; Mon, 22 Jul 2019 10:20:41 -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=cPudWtuSamv60r11nWLMjYpEo7EnFy7gqCCooYOVPYM=; b=G7zcnLF/p7ZorS6O63MUAFY0BqEeRd9wJTmoA6Hn2UoMymuTG+BwnIf3meDVjHdn/9 sBYO2T28EKWxvk/ckWYLXNgiz8byQ00Solp/x3q8Ql6b3wNRzq6sXwxoAAV4GgC8U38l bUQMxqgBRcOXPVujAlMu9msDT7scjr4ZRv90ebWKI2oFD27frxcjtW/uqGKKEF0TnkP7 hY2/dgyYeGjMd587WueqQxWlPvT0ZIav2XnMZim54N24P2evhM7AM6LvJhEo9R2M2xIy g+lZue7jUu3XpzhsKMCoRaCQ9NTA5t0gyOtCFtIfUwfegdG/5uv9g7QNDEqwXezx3u5D LsRg== 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=cPudWtuSamv60r11nWLMjYpEo7EnFy7gqCCooYOVPYM=; b=OpVA8EonaOscgtgxUjgXjStU3RRO6aF0UUAkcTWxf9xLmuGa2rXs4Kmxtu6ksGJLHD Ff5FFtRzPINhSgH4en3WgEGu+p89yUzhlUqt2pW2AyYkJuCpAWWL7vx4G6dK7KjHiotk zEhaP8RfcWtppVyr25g8do73GNqOy3I/XYP/ZRUVZMxQG8bS8Dlomj4z1wY/QTC/RmjD 3Fx9Zyizogu8IJdq4oIDguDHobWGGpN5oI/IzY6Jo48uOIo0Ai4HUYMk46iyzMElvWNX rhnlO2jFCzyFRorMAlybl8PrvfWLGtKt/KGvvERVSETWncwWHovKEPEJC2s0JalxOYCW yytQ== X-Gm-Message-State: APjAAAVWHKww0gVhiibL27wx820SO4CcZchUX1moHaPrzZCJm75mSMx7 7iG8ioNgW7ePlMo2xW/STLk= X-Google-Smtp-Source: APXvYqw678a3KdueLprZ1XDok6dCSJ5gLu/OmimkKnsCW4mrsGXYU0vt8EaaUJquU/I2Do3t5NchUg== X-Received: by 2002:a17:902:9689:: with SMTP id n9mr77404506plp.241.1563816040774; Mon, 22 Jul 2019 10:20:40 -0700 (PDT) Received: from xps13 ([167.220.105.181]) by smtp.gmail.com with ESMTPSA id t96sm36210746pjb.1.2019.07.22.10.20.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2019 10:20:39 -0700 (PDT) Date: Mon, 22 Jul 2019 10:13:16 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: Bruce Richardson , dev@dpdk.org, stable@dpdk.org Message-ID: <20190722101316.33121639@xps13> In-Reply-To: <3107061.JzsCpgzbfO@xps> References: <20190715234136.3526-1-stephen@networkplumber.org> <20190722090610.GA289@bricha3-MOBL.ger.corp.intel.com> <20190722094323.613cb090@xps13> <3107061.JzsCpgzbfO@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [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, 22 Jul 2019 19:04:55 +0200 Thomas Monjalon wrote: > 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? > > > Yes, constructors are run on dlopen. But application should not have to ask DPDK to dlopen the bus devices. The core principle is that dynamic build of DPDK should act the same as old statically linked DPDK. Otherwise, the user experience is even worse, and all the example documentation is wrong.