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 3174BA00C3; Tue, 1 Feb 2022 11:06:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B589740691; Tue, 1 Feb 2022 11:06:50 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 2C81340685 for ; Tue, 1 Feb 2022 11:06:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643710009; x=1675246009; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=N/uJRMNCaDe8ijYF+hAJ+GJbt9rTYGIpk7XDMftQnC8=; b=HnLxQeDL+1+8Q5/qN/jmNkltzAgYy+VblW7Ixk2zwLrlTLCN9eJJsjI2 UCb0yDp3qspsixsh2cIVcTakIp0l+1wH1QwMA1aJrsk10pFKkgBQNnHTx zWcRobPVMd2QxvuCtjqzUxYt4pIAvJXizXlr6UPrK/4mpBCVj7IWN3g3Z IhPVOoXPkQK9svreSYKOy+xB+YsELcD+KZdf//cOz7dTAGT4jhnD0k9Lm FzEsKk58ZRYUH1dzEXnEUr7HmzNStkwr6Z8APfqrKXWJySl8BhoshOpeQ vdbgfw7V57W1d+atTpIqjnx4+Kn+KOZz92pYbiW7Mh03uCIxNGzWSIdUr Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10244"; a="308391805" X-IronPort-AV: E=Sophos;i="5.88,333,1635231600"; d="scan'208";a="308391805" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 02:06:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,333,1635231600"; d="scan'208";a="497294612" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 01 Feb 2022 02:06:48 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 1 Feb 2022 02:06:47 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 1 Feb 2022 02:06:47 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 1 Feb 2022 02:06:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SQtwbDGyXuaRARk+aef0pC68LN8G2szp2pqEJCPQSuiA/pnhxz3G0zasdLmO4W2cUByoKyN/Lq3kzvFSnFcbjsv2IxRGdIoNO2On1IXmqZjco/NXeiFuJlg7t7ygjF7XjUEakSilyqToDoSEp7FUNmW90YY3IM7n6W7up70Ljrnh2Dzcu/CAmah68JxsI+GD7bY2/ViYqeg05YcvN/GR7vwVy5vjJsybkAqByh4NCc3m/9Mb29D+rPdDLFDwnLPxiEix96TqfpFM/RE1LwHGwlpVy5cK8tas4nAd7VPjhAP0otuLrCoyah2vvVuTYmDJhQlESSVmY2Q+OsKaJhaLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FChIJhAhKND8BaNZmwXNRvOKoUZ5XhzhGA7LmotK4tE=; b=X5c21Yp9sbvqtj9ZfHkbLVTIDAY3CgMgLTl9g529nNFxWTr/zpGPwSmxCp1BBeGoHQI0EAL9xCrHunV2rrafBt5G0SdZk828KNMNQZMiqMCk/RVR5JH69wnDJJIRQireYCERjFD9mfaraQftNdi398PZ8c42xmW29WgYTvmmfFmaufe2zeVwawodkvG5+08VXeRII3bu5AWXXzHXqy32IIRCvBO4xcaJwv16kItQWL8UMgk8U8rFGjkCLdvQ80cjZSRYxDxO4wnJ6syYmCD29aqqLPnuC17XwE9mur62Ppc7KClVaC1XCXsVp53Yq6lmCTHlkhKQ2qbSUdBasp/+eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by CH2PR11MB4390.namprd11.prod.outlook.com (2603:10b6:610:3d::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.19; Tue, 1 Feb 2022 10:06:43 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4930.022; Tue, 1 Feb 2022 10:06:43 +0000 Message-ID: <53216eae-d0d7-fa12-9feb-82d5649f8f6a@intel.com> Date: Tue, 1 Feb 2022 10:06:37 +0000 Content-Language: en-US To: Bruce Richardson CC: Ciara Loftus , References: <20220125072043.1590-1-ciara.loftus@intel.com> <20220128095029.4402-1-ciara.loftus@intel.com> From: Ferruh Yigit Subject: Re: [PATCH v3] net/af_xdp: use libxdp if available X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0050.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::16) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f86c9bc3-9c5b-4aa7-e1d2-08d9e56a8c52 X-MS-TrafficTypeDiagnostic: CH2PR11MB4390:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OW0qELh+jtLo8KPhSG203zzYS/TN00Ua484PirEL0wSDlnN+eqsbBHOJ4VzcAtVaSTRdO8Z6VI0UOjihuBYkak7k1fxku4LUSkU1sHk1gsz6LEl03o4AQs5gwK71/sfBHSjsI4UCQ1TIY2tbBdM/9n7TWUnECxKJjzlIP/l2sJujnuEWpZwk+74gthM0vYGXrXArRP6lCuvbp1XeQ5gQIGrW8AzVxBc8sWvb3fuObHZxF5mZ+6d6lpGE4UfWiWktuDvcfUU6CyV2m3V8fDd+cdY3OG9YSZ8eOlkXYmz2F8oCpiahXQ0MuQjHRoZNbNtP3lJAy6oqezAIsrHvQVuyuUEeYsKCSE3jLv07uktSFSC3eEVxC42IoHbos8sCet2jL7uUGnyuZzHdQOUJhPJdLcISTmYM5J6SKUbE1c0mHTbGyxqsnQ58eSVsi8Js+PH0Vb7nU60jg5HXG45R1gm90f3GgyaM4VQ0kZPxWOaGw9jPYkrXQa/Qawx961meOVGjuQ+SW4grxzQaRBrTK6JhY3NrkV/5LrQoEGmSteea5XiwSkNMGDVoCL2aSk/9bSX5Q3GVzcIXg/hc/2v7nqNm2FdmDeVv7PIaZO0CB9MPPwm9h4FXu/SLlvj8HWS0idX+XofXF6tshN+LQSDYN0nqD72TAFcNbN/4HzXdGWEkAl4VGLkQdONxtqgWOEe90KqHdt77gba5zMTzl+g3K7T8rHJ3L447DletViLrZmmauKa8PVmTa0WnGxwLLcyO97uMbXV13BxQX73BOYCoOTmvTf6BxYJqHcHyksNm04fAI9iwv8zBXJmYEZlwQKHHhOx5 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(31696002)(316002)(55236004)(66946007)(6666004)(36756003)(86362001)(53546011)(38100700002)(6506007)(5660300002)(37006003)(966005)(6636002)(508600001)(6486002)(4326008)(6862004)(66476007)(8676002)(66556008)(31686004)(6512007)(8936002)(82960400001)(186003)(2906002)(44832011)(2616005)(83380400001)(26005)(131093003)(45980500001)(20210929001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TlFkbzk0U1JHcHdJdWZoOUViNzk4Q3pXVzRLVnl5WkxhKzFiR2R5SkZoL1M0?= =?utf-8?B?ZVYyWnJZWTlYa0k4M1Axa0FRUzYrSFpxalljTkRZYUxiWkIxUmVwMFhndmF5?= =?utf-8?B?eEVtY1FpM1ZyTjVJQzZxR3AzdGZXejRNbHA4akJ1Q0dvSngxamowdlYvZitk?= =?utf-8?B?QUN0TnUwS3BBWDRuUFR2ajkwcEszUG9ZMHJEc3BMYWVwa2p5Z2IySVllWkdU?= =?utf-8?B?QVJHL0NLSU1QMGZtMHlvaHdLcHVaZXBRVlY5TllXbmpURjIwOFF0b0JSNVhx?= =?utf-8?B?UjNyazk5dlpjT0ZKc2F0NVU5YXJkQWtSdTI3OUltdFB5L010MG5kak9XR0di?= =?utf-8?B?QktOVzhCenMxUk9BRUkzSTIxaDhDT1ltWXdNcjFIeXNEaUZ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= =?utf-8?Q?GbYTik/YOMS0ZzCfao7s27I=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: f86c9bc3-9c5b-4aa7-e1d2-08d9e56a8c52 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 10:06:43.6137 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v7He7FxqxWQWv3pWHY95fgK92Mo+s2ybmaV43Je5AD0r+geqmvVbtU5s7H/nw819YgfpB4M+Qgd6FadHlVz2MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB4390 X-OriginatorOrg: intel.com 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 1/31/2022 6:05 PM, Bruce Richardson wrote: > 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? No I didn't. But it works as expected next day without me doing anything, if the issue was ldconfig there can be regular periodic runs for it (I expect installing a new library automatically trigger the ldconfig). Anyway, I am proceeding with patch as it is working now as expected.