From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by dpdk.org (Postfix) with ESMTP id 09EE62BD9 for ; Thu, 21 Apr 2016 17:29:54 +0200 (CEST) Received: by mail-pa0-f48.google.com with SMTP id r5so27324367pag.1 for ; Thu, 21 Apr 2016 08:29:53 -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=qb9LEVCYDba/VRTKH60NiG9Y5dnyafCJUL/m4zm5Dp0=; b=YWx2GrU0pYLYvMV6VxQXsQolwE3ZS+vVjwRx0gPd2InXG4OZBSEYg1/RN+sO0lhdkb 3M7jn1rmLGoCKXQR37zDJv2jkhEd+0thPO2qmlDQr9oEoXYWYiITwR9YrvKNBM0fjtVv 6QXfbYADUMqeL23R6kysi3v3UH15aMkP/owMutg9JwYyJS1Z5PEIw9k1qOmvKPiRilTw B09rQa5lyYDSUKadf1erQzY6pcmIZNc/jAJvyE2NTcEz+ae2TnOr6d8oaOWlEZ0OuP7g ESKBi1x28D//VUEn9tOb9DikbGk4UDINLjDLBCagzkrjagUOnag4CeO/fnwTfJpG0CsE G0EA== 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=qb9LEVCYDba/VRTKH60NiG9Y5dnyafCJUL/m4zm5Dp0=; b=hXEBrfo6KclWZBxCsUJCm3O6g4dXdrvMtsuDOgTH9jOeHMCqNFuRxPzLrCJ7ddzxMi Ve7oeH8ruMskRwHfRWlasJPuU+V7W7Kgxni+c32blkBDc9jNL8k4XdtKulxd20qGnvAa b3HG+U3/91OA1jv/Nn+QkpjoMUXUkYPN/Fk4DEOg005xf4ul4wFQ5B8/PlX9QWFnWKLP qVItbvZh5Ls+jpDyWBWlvSqudFLFiXiyPE1qihcct/6w/sqPHQlFZiB+4wY6zcGO7AYN fzNwi5jqDSfX+ZAPTMkagu8j5Ujq8mtIXEgX4di+zpAYMHcDcvIPgdmqyp+6WvGZGCKe MlaA== X-Gm-Message-State: AOPr4FV2UwVGg7Y1Wcuikib0efFqeHN3WyELiEoFoQw5SPN6nsff5BfLarKyanh0TEaAQg== X-Received: by 10.66.251.10 with SMTP id zg10mr21404481pac.1.1461252593385; Thu, 21 Apr 2016 08:29:53 -0700 (PDT) Received: from Pnueli.local ([2601:644:200:ade7:28df:5fec:4519:b7a6]) by smtp.gmail.com with ESMTPSA id dy6sm2952729pab.48.2016.04.21.08.29.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2016 08:29:51 -0700 (PDT) Sender: Aurojit Panda Message-ID: <5718F1ED.6000706@cs.berkeley.edu> Date: Thu, 21 Apr 2016 08:29:49 -0700 From: Aurojit Panda User-Agent: Postbox 4.0.8 (Macintosh/20151105) MIME-Version: 1.0 To: Thomas Monjalon CC: dev@dpdk.org, Panu Matilainen References: <57158D01.5020407@cs.berkeley.edu> <571895D9.3090700@redhat.com> <5718EB59.5010808@cs.berkeley.edu> <2358356.HZLcvC2y3R@xps13> In-Reply-To: <2358356.HZLcvC2y3R@xps13> Content-Type: text/plain; charset=ISO-8859-1; 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:29:54 -0000 [The original report is included below for your convenience] Thomas Monjalon wrote: > 2016-04-21 08:01, Aurojit Panda: >> Panu Matilainen wrote: > [...] >>> 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. > > What 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. > > ? > Are you talking about combined library? > >>> 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. > > Please do not hesitate to send some patch to show your solution. > Thanks I was trying to run testpmd from DPDK 16.04 on Linux with kernel version 4.4.0-1 (ld version 2.26). My machine has two XL710QDA2 NICs, and I built DPDK as a shared, combined library (i.e., CONFIG_RTE_BUILD_SHARED_LIB=y and CONFIG_RTE_BUILD_COMBINE_LIBS=y in config/common_linuxapp). I found that the issue is due to ld not linking against all libraries with the new linker script (introduced in 948fd64befc3726) but am not sure how to fix this. As evidence for this being caused by this change: $ LD_TRACE_LOADED_OBJECTS=y ./testpmd -c 0x1c00 -n 4 -w 82:00.0 -w 82:00.1 --file-prefix "send" -- -i linux-vdso.so.1 (0x00007ffe11b3e000) librte_distributor.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_distributor.so.1.1 (0x00007fa55eb85000) librte_reorder.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_reorder.so.1.1 (0x00007fa55e982000) librte_pipeline.so.3.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_pipeline.so.3.1 (0x00007fa55e77d000) librte_table.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_table.so.2.1 (0x00007fa55e55e000) librte_port.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_port.so.2.1 (0x00007fa55e34e000) librte_timer.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_timer.so.1.1 (0x00007fa55e145000) librte_hash.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_hash.so.2.1 (0x00007fa55df37000) librte_jobstats.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_jobstats.so.1.1 (0x00007fa55dd35000) librte_lpm.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_lpm.so.2.1 (0x00007fa55db2e000) librte_power.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_power.so.1.1 (0x00007fa55d91f000) librte_acl.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_acl.so.2.1 (0x00007fa55d705000) librte_meter.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_meter.so.1.1 (0x00007fa55d504000) librte_sched.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_sched.so.1.1 (0x00007fa55d2fd000) librte_vhost.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_vhost.so.2.1 (0x00007fa55d0e6000) librte_kvargs.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_kvargs.so.1.1 (0x00007fa55cee4000) librte_mbuf.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_mbuf.so.2.1 (0x00007fa55cce2000) librte_ip_frag.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_ip_frag.so.1.1 (0x00007fa55cada000) libethdev.so.3.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/libethdev.so.3.1 (0x00007fa55c84f000) librte_cryptodev.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_cryptodev.so.1.1 (0x00007fa55c647000) librte_mempool.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_mempool.so.1.1 (0x00007fa55c444000) librte_ring.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_ring.so.1.1 (0x00007fa55c242000) librte_eal.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_eal.so.2.1 (0x00007fa55bfe1000) librte_cmdline.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_cmdline.so.2.1 (0x00007fa55bdd8000) librte_cfgfile.so.2.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_cfgfile.so.2.1 (0x00007fa55bbd6000) librte_pmd_bond.so.1.1 => /home/apanda/e2d2/3rdparty/dpdk/build/lib/librte_pmd_bond.so.1.1 (0x00007fa55b9c4000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa55b7ae000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa55b5aa000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa55b38d000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa55afe9000) /lib64/ld-linux-x86-64.so.2 (0x00007fa55ed87000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa55aceb000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa55aae3000) As you can see librte_pmd_i40e.so is missing from the list of files. Furthermore, using $ LD_PRELOAD="../lib/librte_pmd_i40e.so" ./testpmd -c 0x1c00 -n 4 -w 82:00.0 -w 82:00.1 --file-prefix "send" -- -i correctly enumerates the NICs. I unfortunately do not how to fix the linker script as checked in, but wanted to report this bug in case someone has a fix.