From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id 5AC88FFA; Thu, 21 Apr 2016 17:01:51 +0200 (CEST) Received: by mail-pa0-f49.google.com with SMTP id fs9so30073386pac.2; Thu, 21 Apr 2016 08:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-transfer-encoding; bh=ha9VjnQFlAlCGh0eTcF0pMeO3FQ23AUquj1or1hc/Dw=; b=RmeEbkwRH8s4C4K8hKQ1tXLPFpbeIO57TBYFU+JqJDQRnIwo/PT9nX42wR+RGBWnyj Z5gnDWBR/+24T3eCEeHsl9wKlAZjfUV9QjczJa8H6i9iiwAQ0jy/hR3O4gkummVo8PWf Zt1THq4mmHAe42LcBi1dp8FducfJ2evrnCPYnMyQzhO+nUolFBShXAT34d+RrBLC036q cgS7xSoHDYbNFj4W3iku+o3guJXhqeSEbBwomVT/mFMdiuiF65LRnvY1W8k8VZUayYO0 kWZ8lg+RO6z6I8QT53ykM18tnx6ZmHq86/m8C1dfe/AHyQMLDqngPjqWHUbCvz0lPIlL MbbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to :content-transfer-encoding; bh=ha9VjnQFlAlCGh0eTcF0pMeO3FQ23AUquj1or1hc/Dw=; b=aJ2v2WBiUKO8frNpeWpaUI7uqX1f+jNVUb8AdbsAKw47sHr8ZGEFYWXWsnspJod0Js PIhFUyEbfeTlQuEraZAt45op/6XC4GtX9/DOusybjLdNOLgebY16BePU3hvxCRAkfZj+ 3FXE4zFsmYZ6ETx5WGHi4a2lA1IBLWfwOo/grENR6ELzE1eChMWsqfcDxJ5aaS/Hybh4 Z+nuewkMQyTav/Qo0V8JdxTfMFUM3DcwWnWUl4bbacLQy2Z13C8JFtCk7s1hVCg94LwT IfvX9efab5rj9kpj2W+W6cx1SE4eNFlKkUTTqioyyJEHJhIQzt/Sy+QDMQhGeS6TRaxW 38Uw== X-Gm-Message-State: AOPr4FVLKVhuOEFz5cbLn7srsNeZBAqO9w4PuQ20XVxgxqyfUUyvD0UwJZuHuHODmjHxGw== X-Received: by 10.66.222.202 with SMTP id qo10mr20517916pac.141.1461250910516; Thu, 21 Apr 2016 08:01:50 -0700 (PDT) Received: from Pnueli.local ([2601:644:200:ade7:c1d5:c0af:f655:788b]) by smtp.gmail.com with ESMTPSA id r5sm1796231pfi.67.2016.04.21.08.01.47 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2016 08:01:48 -0700 (PDT) Sender: Aurojit Panda Message-ID: <5718EB59.5010808@cs.berkeley.edu> Date: Thu, 21 Apr 2016 08:01:45 -0700 From: Aurojit Panda User-Agent: Postbox 4.0.8 (Macintosh/20151105) MIME-Version: 1.0 To: Panu Matilainen CC: users@dpdk.org, dev@dpdk.org References: <57158D01.5020407@cs.berkeley.edu> <57173EA4.9000208@redhat.com> <5717917D.9030504@cs.berkeley.edu> <571895D9.3090700@redhat.com> In-Reply-To: <571895D9.3090700@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [dpdk-users] DPDK 16.04 link changes cause PMD drivers to not be loaded X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: apanda@cs.berkeley.edu List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2016 15:01:51 -0000 [Cross-posting to dev] Panu Matilainen wrote: > On 04/20/2016 05:26 PM, Aurojit Panda wrote: >> I am sorry that is a bit unintuitive considering: >> >> (a) This behavior differs between static and shared builds of DPDK. >> - In fact this behavior was identical in 2.2, and even in mainline >> before 948fd64befc3726 went in. >> (b) You already know the EAL_PMD_PATH at build time, and it makes it >> quite hard to ship scripts or anything to build DPDK, since now the >> configuration file becomes dependent on location. > > The expectation is that shared libraries are installed to a shared, known location. Otherwise there's not that much > point in using shared libraries. > > Note that you can also use the EAL option -d to load either single PMDs or entire directories at runtime (regardless of > EAL_PMD_PATH) so you dont have to know the path at build time if that's what bothers you most. > I am actually bothered by needing to supply the path at all. You seem to assume that knowing an install path is essential for shared libraries, while you can in reality embed this in the rpath. Shared libraries are used for many reasons, including interop with some runtime, in which case they are not installed at a known place. I would prefer for those PMDs that are included with DPDK that either they be loaded from the "known" build path for them. >> >> I wonder if you would consider changing this, as it stands just building >> DPDK after setting CONFIG_RTE_SHARED_LIB=y results in a testpmd that >> cannot run. > > In shared library configuration, testpmd is not directly runnable regardless of the drivers since its missing all the > other libraries too: > > [pmatilai@sopuli dpdk]$ build/app/testpmd > build/app/testpmd: error while loading shared libraries: librte_distributor.so.1.1: cannot open shared object file: No > such file or directory > [pmatilai@sopuli dpdk]$ > > You'll need to get those libraries into linkers path anyway, either by installing them to a common location or by > extending LD_LIBRARY_PATH. In either case, you need to know where the libraries are anyway. > > All of which is not to say there might not be room for improvement, but the linking behavior is not going to change. > Again, PMDs are *plugins* that are *meant* to be loaded at runtime. That allows for all sorts of flexibility especially > for packaging and shipping, at some extra cost in setup complexity. I am all for a plugin architecture, I was merely suggesting that you embed some path infromation at the beginning. Also please note: (a) This behavior changed recently. (b) This change is entirely undocumented, which is why I was reporting it in the first place. (c) It is actually quite unintutive, because previously ensuring LD_LIBRARY_PATH was correct was all that was required to get any DPDK application to interact with ports. > > For your own purposes, you can of course tweak the linking settings as much as you like. Look for "plugins" in > mk/rte.app.mk and change the shared lib condition on the line above to "y" and there you have it. But that's not the way > plugins are meant to be used. That is not a reasonable solution given that it makes it very hard to track future changes to DPDK without merges. My alternatives neither break people's abilities to use plugins, nor do they impact behavior. > > Oh and BTW, please don't top-post. > > - Panu - >