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 D01F3A034E; Mon, 31 Jan 2022 19:05:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5D8D41203; Mon, 31 Jan 2022 19:05:15 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id F369441190 for ; Mon, 31 Jan 2022 19:05:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643652314; x=1675188314; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4Yw0/ChW/K1IfEASiBwgya54LacX+kkB4r5VKlBtJHU=; b=MAu82GTdjAsQtw6HZgI/d3AJ63pZ2BSAQiGibmhMGoObPj5dRr3X2baf chPMcDkko0bfX9Tm9dfYzPu5QxdMe7KDt11PPGqXeWfUJ6dZ8c5p4vjnJ Ig6dlgo2NJ4ohFOICSyTJVOagUBlJ+h3lakf8B6DAFIpHX3h3PO6ygrsf Sn/i9Ku5DBaNut6oayeUvr02LzPW7mkKvXQPucrGpBtZBsaMdYfEf37j8 SDtnBm4PudJl5Snrb88m5AgZhsNfYa0FZ6WMOXWsPA645s6ZfrEJxYzWB hO2JChf+1jqOT3ZPc3sxFgirx8vXtMmoKKvpIqwSRFaHb8DY7Ujb8tY41 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10244"; a="310827589" X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="310827589" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 10:05:12 -0800 X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="481843942" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.5.203]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 31 Jan 2022 10:05:11 -0800 Date: Mon, 31 Jan 2022 18:05:07 +0000 From: Bruce Richardson To: Ferruh Yigit Cc: Ciara Loftus , dev@dpdk.org Subject: Re: [PATCH v3] net/af_xdp: use libxdp if available Message-ID: References: <20220125072043.1590-1-ciara.loftus@intel.com> <20220128095029.4402-1-ciara.loftus@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Jan 31, 2022 at 05:59:53PM +0000, Ferruh Yigit wrote: > On 1/28/2022 9:50 AM, Ciara Loftus wrote: > > AF_XDP support is deprecated in libbpf since v0.7.0 [1]. The libxdp > > library now provides the functionality which once was in libbpf and > > which the AF_XDP PMD relies on. This commit updates the AF_XDP meson > > build to use the libxdp library if a version >= v1.2.2 is available. If > > it is not available, only versions of libbpf prior to v0.7.0 are > > allowed, as they still contain the required AF_XDP functionality. > > > > libbpf still remains a dependency even if libxdp is present, as we use > > libbpf APIs for program loading. > > > > The minimum required kernel version for libxdp for use with AF_XDP is > > v5.3. For the library to be fully-featured, a kernel v5.10 or newer is > > recommended. The full compatibility information can be found in the > > libxdp README. > > > > v1.2.2 of libxdp includes an important fix required for linking with > > DPDK which is why this version or greater is required. Meson uses > > pkg-config to verify the version of libxdp on the system, so it is > > necessary that the library is discoverable using pkg-config in order > > for the PMD to use it. To verify this, you can run: pkg-config > > --modversion libxdp > > > > [1] https://github.com/libbpf/libbpf/commit/277846bc6c15 > > > > Signed-off-by: Ciara Loftus > > Tested build with combination of following, build looks good libxdp > 1.2.0, libxdp 1.2.2 libbpf 0.7.0, libbpf 0.4.0 > > > But while running testpmd can't find the libxdp.so by default [1], > although setting 'LD_LIBRARY_PATH' works > (LD_LIBRARY_PATH=/usr/local/lib64/ for my case), this wasn't required for > libbpf, just checking if this is expected? > > Similarly for 'build/drivers/librte_net_af_xdp.so', ldd can find 'libbpf' > but not libxdp.so (although they are in same folder): $ ldd > build/drivers/librte_net_af_xdp.so libxdp.so.1 => not found libbpf.so.0 > => /usr/local/lib64/libbpf.so.0 (0x00007f2ceb86f000) .... > > Again, 'LD_LIBRARY_PATH' works: $ LD_LIBRARY_PATH=/usr/local/lib64/ ldd > build/drivers/librte_net_af_xdp.so libxdp.so.1 => > /usr/local/lib64/libxdp.so.1 (0x00007fefa792e000) libbpf.so.0 => > /usr/local/lib64/libbpf.so.0 (0x00007fefa78dc000) > > > But same question, why 'LD_LIBRARY_PATH' is not required for libbpf, but > required for libxdp, any idea? > Did you rerun "ldconfig" to refresh the ldd cache after installing the new library?