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 3511DA034E; Mon, 31 Jan 2022 19:00:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8EC141184; Mon, 31 Jan 2022 19:00:06 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9873140042 for ; Mon, 31 Jan 2022 19:00:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643652004; x=1675188004; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=/XHo/xKEGHRvci8+f6jFZjJXHj92SlhmAPsau8XWhHE=; b=AQCochCP8CqSdpYYpJq43pGH/7qhgRrikYYzIWVxK4Wth2yw8CTdQniZ h0Kd/RjugUiRFLb7HlUvI/mqcriNIidHkcv3Bo3192JGGL3VaCU6Gbfx8 Sxf9lYOIIH8+5k7AIFSGN7ch/uZgknEHcDzUYsTHBk+7tv61lYR/OAqct Toho/W5FXlXbDKxknh+uOtRvNleioY04swvWIKwQp86xdu5twtGkuflxv zfYVYDQAoSFMLhOH72ugisCbbSmxDvm3kOHhMDFU68fYu7yRz9YWCiGMb Pi2y8ixb/o9MJgfWZR0D43UaPE8zCeKV8wfTe1/7ID9afCvi4PySPlKF4 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10244"; a="228178940" X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="228178940" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 10:00:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="497006110" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 31 Jan 2022 10:00:02 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 31 Jan 2022 10:00:01 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 31 Jan 2022 10:00:01 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 31 Jan 2022 10:00:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CGBb+0Q2PV/W+GwgJnj1qC1LUlSSTON/uYJxpSKMW4YerMDZPRCg3Tpea56/E+JdLKqrqZhLM++Kvcu7ztRFs5yXVMSbezC1iRUqG6vUk2AcVvidL9OP0fQ460pWxkP5DlaZQUxV2ieF+BtNuGJFBWOdwFS37QFRLVelRWiHw0c+2K+SXbl8ubrTw/YL6fI2cvqC7t9G+Fz2r2WXSVr/RwNpbxhp+8uJlf4wCPUIf6MpSz9JlzGIUppT+U6RQLFreE6yC6VorlZcogu8lzY0JaIZmxHb0JaFV9PqqB1ghw+spUlYJv+Q8aZQ53opZE2gD4/eXMph6MwotSAyr4oAow== 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=STyrZ2UsaCRcFOElngZ8vSArmvMIWSECl9+AhRMFMws=; b=LrKTjsr+8TU3txw+p5ut/5JPPl3mDx7eR2dgVH+i4+K9fhLW/SGDWcZRS4rR5dLqjF3bwJaC3Iny7FUUnRgHtCD2dp6Y9Z34Exh5+3/fsuwAdv+2MlPQ3rz5mxEu39JHQfIOV6XqCrJ8oavhPsUrtY+FpvUQBkYFtb1AXGBJO7b8jN9ura7fOuaS6bjM3Skq+n91adcYePlMIN8F8oLbqzIMFzE8ntG7Ofy8pCTAsFvTajSRvZp4NBtATOcLbUj7MjC9c3JmvOHPn/b2SIVe2KNjLKzPlOgEA472ePMaCK75hsoEdU3y5RtGpQy4b6fAjioCLOfIFkPsHyDQmM9zNw== 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 BYAPR11MB2968.namprd11.prod.outlook.com (2603:10b6:a03:90::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.18; Mon, 31 Jan 2022 17:59:58 +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; Mon, 31 Jan 2022 17:59:58 +0000 Message-ID: Date: Mon, 31 Jan 2022 17:59:53 +0000 Content-Language: en-US To: Ciara Loftus , CC: 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: <20220128095029.4402-1-ciara.loftus@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0396.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::23) 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: 2261312a-0549-488d-0af0-08d9e4e37e40 X-MS-TrafficTypeDiagnostic: BYAPR11MB2968:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2089; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5U5gZYeKwSkPAH+fgmyT3y4AoiV0vJpAvn84aRwd68CAm0c4GP1HXu3sjai9UWrcLhmMeez7hRyEhBR4xbwwaztnsBN/T579aKqt8TeIvCwmiuLkzYFzMqG8LvXw6ms4oUd/qr9cezw1xjppPCKpZIPG1tbuihaHxOzrfsr5ovwfJKwlfvG/Ep5iWvbhMRpOIYBHX7UygJ1GFTdoLZ6f9tC6nEWuEn/4YXp4wKbzd12eFxdkJKG+hDv16egoC3tFwh2Sgr61W2bgw9SevjJVYIxxiYaMAq7DfL3oKjW5mke5FCEXOr13zPBcblxoQMSQxzRpwy2QXJg8r4oqOhoh0ekpGzy4UAZUSO5/10t4xeBOv5nPKZSMkidKpjtY6xsEcNB2dwIuttyvNrMJgTopmvr7UTG1NDtkQQWQcw5WWuZ5K/XMD26zuE86M8LlujyI6XuztlwyzoB4Cs3gE0Wc+5YpoB3P9/KYsqSVZDYAstwCXVMM8awLG4EjNNm3bfeqTYQuihIaAXwUq7qf5Q3sJC1oLIqEgd7l/y9P3YR6s7R1E6xlKSURmAJy4sGC8KBSmXSwTiay35QP2FFs5VZ/TXlzvJqvuZApZb5sA6W1Myzq1gnwNw17Geuj33XXTl3m5r00Lqvr1L/C5Upr4bGjcYweY+lM3Nj8Gs+pXgBFl8oZxrMroRPEZ6JDmCNQVyMBbhi5082NhVF4iOzmgMVWi2oftDyZfyuBFcdJVm6iblzYmq7DFrJ6fLrIQ+UDhcf4Ptu+/j2f52FI4Z9FrvYkoSqGlpN5EPJDyRAbbYjdf+IcPN2iNl4IhrE4aZS8LdaQ 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)(38100700002)(6486002)(966005)(66556008)(66946007)(66476007)(36756003)(31686004)(316002)(508600001)(2906002)(31696002)(53546011)(55236004)(83380400001)(86362001)(6666004)(6506007)(44832011)(2616005)(6512007)(4326008)(8936002)(8676002)(107886003)(82960400001)(5660300002)(26005)(186003)(131093003)(45980500001)(20210929001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SnhERndSdmdLU3Y1akU3Rjh0Z1ZxcmJvZFZLL3JnSGtoeS8vTjBzQU13aGUz?= =?utf-8?B?Y2R0RXFid2R3ZGJFSzd0L0gzVldQYTNqckt6WWtCTFJQYW9wZnU1MGFuZmJP?= =?utf-8?B?SXJwWXlvWklpeGlmN3JGeitkYzIwSENCQ3cvRHVUa2lOdUxoZkd6VVhsUVBB?= =?utf-8?B?OUkrN2dTZ1lEWVFHR0M4RFBtVVphUHBLYkJFQUQ5YitzbjB3QUZkR1lWcFZ3?= =?utf-8?B?ZmhSOHpSenNQZmJXS29wMnNBQ1pOejdDdnYySTM3MVBQclNobk5OelIzak9n?= =?utf-8?B?NUhjcW9OYVZNeXgyNHhvZjVXWXB3c0pqc3RtN3lubkRaTDNxaFBYeXFheTRV?= =?utf-8?B?elFhWlVxUWc2RjYwM0k0amJDMkxYNkw5STVKTHVaay9ycFBn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QIDi22Dh5BxZY=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2261312a-0549-488d-0af0-08d9e4e37e40 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2022 17:59:57.9533 (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: qB56GqkskG9R+n1uyIYaJHPK3RTRszT4ivXHKcc2weaeOJNicdPGarasrFPrmDSiZJbwo0Klzunkh4KFRjW0jA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2968 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/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? [1] ./build/app/dpdk-testpmd: error while loading shared libraries: libxdp.so.1: cannot open shared object file: No such file or directory