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 8F949A046B for ; Tue, 23 Jul 2019 20:29:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D2FA1C08E; Tue, 23 Jul 2019 20:29:32 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id A1A9D1C08D for ; Tue, 23 Jul 2019 20:29:30 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id 19so19559116pfa.4 for ; Tue, 23 Jul 2019 11:29:30 -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=CaswaAXx2TjdqyuJeApi4wMmOFYYPldXfwQgB3vs2C8=; b=wYqECo/b01EJS/GN1zvCPU372n4nhhARtxW5DFVjXKJVkdjyzYcad/HuV2gjgAfUee HMoEMAaZjOh0HDQuiGjcMMiCYoPt4Af6ljKd++04/mvl5bw1GWtIZN3NQZDzHp2f0jby HkPE8/MK3gw2DnqoJPK80Olwr0Y8js+DnX6WOGL/zkgP0Zu7w1972gkCc/rplY3cvavM Iy8oTyiwWPOXXiFak3Ldv/VE4sVm1B3cApcTXhXR9TC57U1hBUxqZ4Wd6rgh07OjQhWh /X7HsOEZmIymYGwD7j2OnWRGqKso2CHpafutCCSFqYOGExEk86zRtaZPr5NNreMnKXUb +kKw== 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=CaswaAXx2TjdqyuJeApi4wMmOFYYPldXfwQgB3vs2C8=; b=XUltyHEUgtR/XEBcOdMF5493SjaVOn0HBeU6LqQ1L/AwcnDrtPZQihN7+tJophiPMY 8naV0PqKzgqdlvdoUl7ylSH1KKBCAgR4h4WZa2VumKbvHxZJx0C388VM9W/trocyFI6e Wt0V3H7G+LYvva5W09rqPiZ4CLdfagq832zPpxoRfWEV692bz3eM3HzEJW61qgwhfB/x iF9OrhIB/Ya1Rf32SnP4t3qRR5VOWqy8w7v3mRN6GR2SWD42CMhp1fBBoUPtpBPXzonF VcXgxtReNd7KcU0nO38id18tvFoo7/U/9jhs/MiSoU/pMeA+ZHodJ9hfCA4WbZPTRtYf mpng== X-Gm-Message-State: APjAAAWZXuQdrPlunOFrHrtWICGUNbMdW6g0sSepvslSbQej1LIGgogc iamPapm7oHCyr+UogQnKjCI= X-Google-Smtp-Source: APXvYqzZK2j54RziwF67eE9i5gLN3tIBvxryBRc058I7ILeMHhrGgZ9+fBq+65rneBJb1Ghl7tAUkA== X-Received: by 2002:a63:1b66:: with SMTP id b38mr77290403pgm.54.1563906569575; Tue, 23 Jul 2019 11:29:29 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g6sm38538629pgh.64.2019.07.23.11.29.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 11:29:29 -0700 (PDT) Date: Tue, 23 Jul 2019 11:29:22 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: Bruce Richardson , dev@dpdk.org Message-ID: <20190723112922.52dcb9a9@hermes.lan> In-Reply-To: <7229382.2RzrNnEHBx@xps> References: <20190715234136.3526-1-stephen@networkplumber.org> <4987111.cxvgFvst8F@xps> <20190722113437.3c509e0b@xps13> <7229382.2RzrNnEHBx@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Tue, 23 Jul 2019 09:59:04 +0200 Thomas Monjalon wrote: > 22/07/2019 20:34, Stephen Hemminger: > > On Mon, 22 Jul 2019 19:31:08 +0200 > > Thomas Monjalon wrote: > > > > > 22/07/2019 19:13, Stephen Hemminger: > > > > Thomas Monjalon wrote: > > > > > 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. > > > > > > OK, this is where I wanted to bring the discussion. > > > You are arguing against a design which is in DPDK from some early days. > > > So this is an interesting discussion to have. > > > Do we want to change the "plugin model" we have? > > > Or do we want to simply drop this model (dlopen calls) > > > and replace it with strong dynamic linking? > > > > I argue that examples should work the same with dynamic linking. > > This used to work before the break out of the bus model, so it is a bug. > > The PCI support was part of EAL, yes, but the device drivers > were plugins and already required the -d option. > > > For distributions, this also matters. Linking with -ldpdk which is a linker > > script should work. > > There is no longer this linker script with meson. > > Ok, for usability that is a problem. Requiring user to figure out which DPDK libraries to link with is a serious waste of time. It should be possible to just link with -ldpdk and distribution packages and just get the necessary libraries for the application (no extra rte_foo_bar .so loaded at run time), and the application should just work. The idea that the user should link with 20 shared libraries, in the right order and pass -d flags to eal_init to load the right PMD is user hostile. It only makes sense if you want to invent yet another layer to manage the ugly stuff hidden underneath. Think virt-manager versus raw KVM/QEMU. I know it is hard, and I know not all this will make it into 19.08 but let's try and do better. The DPDK already has a reputation as being like a super car, (ie unreliable and hard to drive). It doesn't have to be that way.