From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C85A0A0547; Tue, 9 Feb 2021 13:50:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 400164014E; Tue, 9 Feb 2021 13:50:00 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 4015C40147; Tue, 9 Feb 2021 13:49:58 +0100 (CET) IronPort-SDR: ZpcW/EL4veIs7AdAxCkRGg/A41v6OtJs40b+qK0gkbYa0F4aRHDOGeqRKGX1UQv4ScF/VVd5C0 /maj5MY1bqdw== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="169553637" X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="169553637" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 04:49:56 -0800 IronPort-SDR: TlcktgNBmbWWvALheEINJG0O9lZJHYphhkAfUMo8WPsgbuiLW9DHWHvtV/JxNpKKMQijryJdPu i26UWE2Monlg== X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="396107429" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.24.112]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 09 Feb 2021 04:49:54 -0800 Date: Tue, 9 Feb 2021 12:49:51 +0000 From: Bruce Richardson To: dev@dpdk.org Cc: tredaelli@redhat.com, stable@dpdk.org, Maxime Coquelin , David Marchand , bluca@debian.org Message-ID: <20210209124951.GE1208@bricha3-MOBL.ger.corp.intel.com> References: <20210208163319.507567-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208163319.507567-1-bruce.richardson@intel.com> Subject: Re: [dpdk-dev] [PATCH] eal: fix detection of static or shared DPDK builds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Mon, Feb 08, 2021 at 04:33:19PM +0000, Bruce Richardson wrote: > When checking the loading of EAL shared lib to see if we have a shared > DPDK build, we only want to include part of the ABI version in the check > rather than the whole thing. For example, with ABI version 21.1 for DPDK > release 21.02, the linker links the binary against librte_eal.so.21, > without the ".1". > > To avoid any further brittleness in this area, we can check for multiple > versions when doing the check, since just about any version of EAL implies > a shared build. Therefore we check for presence of librte_eal.so with full > ABI_VERSION extension, and then repeatedly remove the end part of the > filename after the last dot, checking each time. For example (debug log > output for static build): > > EAL: Checking presence of .so 'librte_eal.so.21.1' > EAL: Checking presence of .so 'librte_eal.so.21' > EAL: Checking presence of .so 'librte_eal.so' > EAL: Detected static linkage of DPDK > > Fixes: 7781950f4d38 ("eal: fix shared lib mode detection") > Cc: tredaelli@redhat.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson > --- I saw this issue with OVS, where I was getting weird failures about ports not being bound (in case of physical ports) or not being created (in case of virtio ports), when using a shared build. Since it's potentially serious, I'd appreciate if someone can reproduce the issue and verify the fix so we can consider it for 21.02 inclusion. To demonstrate this with regular DPDK, do a usual build of DPDK and then do "ninja install" to install system-wide. Then build an example app, e.g. l2fwd, using "make" from the examples/l2fwd directory. Running the example normally, e.g. ./build/l2fwd -c F00, leads to no drivers being loaded or ports being found. Adding "-d /path/to/drivers" e.g. "/usr/local/lib/x86_64-linux-gnu/dpdk/pmds-21.1" on my system works as expected. This shows the driver loading is not correct. After applying this patch and re-running "ninja install", l2fwd should run the same with and without the "-d" flag. /Bruce