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 1825AA0C4E; Tue, 2 Nov 2021 18:22:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2F924069F; Tue, 2 Nov 2021 18:22:58 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 743B440689 for ; Tue, 2 Nov 2021 18:22:56 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10156"; a="230040202" X-IronPort-AV: E=Sophos;i="5.87,203,1631602800"; d="scan'208";a="230040202" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 09:50:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,203,1631602800"; d="scan'208";a="599576857" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga004.jf.intel.com with ESMTP; 02 Nov 2021 09:50:19 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) 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.2242.12; Tue, 2 Nov 2021 09:50:18 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 09:50:18 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 2 Nov 2021 09:50:18 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) 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.2242.12; Tue, 2 Nov 2021 09:50:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X7km4i9s4s8LNeb9NmCyDQdBaEAW5du+KdL8Lw1a3uREpQrD2nsBt9EfWNYgs3iYkEMvmmvhGONhKB8r+VgqoVyBwR/lhG43pra2AMxMoRNq1ImweLxJgPzDZ8bzypHHk00FxPiuHIew+NV9CkeYJxJpyf9FJR37cI8mhyXaWXBNq+zWHb1dt59W4woavQkvmo0LfdOWdUCpgfr6EKigK7QwNhoTyJIkJrhfsy4++HDziRNVT27c3xp5XusAcW8ywfCAdWyg/PZBezqRMVhzsy7sNW7vCTYeH0aBl39tCO+B8LisroF507p4CFZKHkXqF3wxJrcO25nk++0oEBJz4Q== 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=yUcHRlYswwIXo2ZFEbHf25MvEfkONKcpE/S6Qik0mw4=; b=Z0TMPnqVxQyKpnq72NwSqycHGxZLwKtCxDvpffqZsOTi9eMDhKaVx3kkz1x2g9BjudgG7hZwOc1pysWbcHRRMfNxsJW3eHmzw2AReFCiBIRSOQoJiV1qo+qjNchopvRrxJuVXD8YHOZzRfMA2zaZbcOr5vrzSNH9h2Q0b43Wc7XPkdwo/CssJx5E/hl/ZkZx1lbBUuwKmYrHsYutUMZDn3PXWXarOzPYah5TcAMcUr0FuCzdDG2Aw/d/ob7wmBXIbqIW5UvNHcIeQJuqeqrF0T1RAHgmILNBY7H7ccheUskLrepEEg8okEH8zPX9stjtTGjL1w/S1DnT+FP6ukhsKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yUcHRlYswwIXo2ZFEbHf25MvEfkONKcpE/S6Qik0mw4=; b=JKtagx+Vxnc0yfKDrZZUkMSGeB24wz5TH9RCX89uQBtzSbmU8W0GHlifV8MvWeegz2UrM9uGYlnDidrbDsmPHryp6ZDcj4Pu/+albleg+xgBXITzdPJcxczbhREWHhNQeyrNNTAnmjGkLtD7AMSIvzBCpGbqd9AQx/a6UqxQvMg= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5208.namprd11.prod.outlook.com (2603:10b6:510:3b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 2 Nov 2021 16:50:16 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4649.020; Tue, 2 Nov 2021 16:50:16 +0000 Message-ID: <55d9029e-59e4-83e5-fa12-5bb690b74bd4@intel.com> Date: Tue, 2 Nov 2021 16:50:10 +0000 Content-Language: en-US To: Ciara Loftus , CC: Maciej Fijalkowski References: <20211014095040.29773-1-ciara.loftus@intel.com> <20211022104253.31999-1-ciara.loftus@intel.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211022104253.31999-1-ciara.loftus@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0011.eurprd04.prod.outlook.com (2603:10a6:10:3b::16) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0011.eurprd04.prod.outlook.com (2603:10a6:10:3b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Tue, 2 Nov 2021 16:50:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a9043d9-8234-47cd-2d86-08d99e20d87e X-MS-TrafficTypeDiagnostic: PH0PR11MB5208: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MjZWBUZ94jte1EFB3dECF0/s+ZA3EVbqXg7llfzxwuFncxIuAJiS4DuhcSvHr/b89TqOTJuEVJmhmmWO46IWNO8xfTUibOTyJs42GQ8djkoqFfe66Lj5PdwSkuEANrHvhfCggf65/8qx1OZX3wjTDfiyTQ0hK6+O5vEdG89Jb+7y+ZjEUP55d5XfU25vrj6Kyctqarr/CSyNRSha0vu5zcrv0PfXr3v8VxAPuRSqsWPp2M8LLFWEsc9WH1dqImVvjZROJfNgOiKksQISSjb9V6fOyAq/UPQ3YEWB5dWWtxNCKBSsIhkhTU2LLnWS7KcPNX8h18N6wWb1Fcau/X5dTBVPtSL1oadLM38uTo6+RmtUZtqJ0AD5EmozX9i37AjLlkNZOHax46qY8rSr3jaxkwkqf0Oy2LPxKJ4ft7poivRIKA70krIyUm9VLV3cflJm6mpwFNljCyjDkpFyN+fhO5uE+qaIfPzdquJm+QwA4SBidE1EzYaURCQT0LDbXBecR6MX4e+wykVrRgS9rszgIMGVZczHmnkIm4grGfCSorNhrgsSLIYFR93BL6gGRuXSYDlIgmuZ/8Ux4pxgHRYAH4bkUfJJRUxzS0HYTZX9kexhUWeceJ0z1yx9N6PeOCBE6iWO2eOWp46TKcH8ywPI1X4pZUg/XpGs3NinF1Ol7T4mZ3gbfxHuwF5wyXdVliAh3P6KpWbQnEFcVORw9kgaMA== 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:(366004)(86362001)(36756003)(38100700002)(53546011)(107886003)(508600001)(26005)(2616005)(16576012)(31696002)(4326008)(316002)(82960400001)(956004)(5660300002)(44832011)(8936002)(8676002)(6666004)(186003)(66476007)(66946007)(66556008)(2906002)(31686004)(6486002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVAzRkluRkxTYUVIWmdhZkdoSkJHM1FySXZTalJEdUFZNnYwcU9TUUsxbzJ0?= =?utf-8?B?UFo3TG1ZTXZvRW5lNERJMXRwblJ3UlArMjI2WHV6MlpFWVlZOFBrRzB0UVNI?= =?utf-8?B?Yld1ZVlaaXZwVnFqRFlNNkNUdmZrM1ppYkREaEduaEV5eEZVZWZ1bmVsS0k0?= =?utf-8?B?UHpsRHRaem9NQTVlc1BpYVpYbUZheko2Q1pncXQzQUVhR1RzYzlmbjNuUEdT?= =?utf-8?B?bHhQaVQ0eFR0cmhzZDB4Rm1WeURyZUJQMW5pWllCWFFqUzNoRS9IcUcwd2ZQ?= =?utf-8?B?Snl1c243QW8vNENMMVg4bkt0MFBqcGY1c2JQV2M2RkNVS1psT05aZW1LaHo4?= =?utf-8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EhTby80WXMwTllPZGovTTdxQUc2a3lRb0VX?= =?utf-8?Q?8igzH3oDcAEdrQZAT4jewi8=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4a9043d9-8234-47cd-2d86-08d99e20d87e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2021 16:50:16.2206 (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: heP9KC8I7LoeJRyQRYzFPSIX/cDIWFjqpstHJdl8PX4QrnIOlbTaI2jiwmuh2PRvZHh5ZELBqC5m6dUbE/UpSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5208 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/af_xdp: use bpf link for XDP programs 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 10/22/2021 11:42 AM, Ciara Loftus wrote: > Since v0.4.0, if the underlying kernel supports it, libbpf uses 'bpf link' > to manage the programs on the interfaces of the xsks. This has two > repercussions for the PMD. > > 1. In the case where the PMD asks libbpf to load the default XDP program, > the PMD no longer needs to remove it on teardown. This is because bpf link > handles the unloading under the hood. > 2. In the case where the PMD loads a custom program, libbpf expects this > program to be linked via bpf link prior to creating the socket. > > This patch introduces probes for the libbpf version and kernel support > for bpf link and orchestrates the loading and unloading of > programs according to the capabilities of the kernel and libbpf. The > libbpf version is checked with meson and pkg-config. The probe for > kernel support mirrors how it is implemented in libbpf. A bpf_link is > created and looked up on loopback device. If successful, bpf_link will be > used for the AF_XDP netdev. > > Signed-off-by: Ciara Loftus > Signed-off-by: Maciej Fijalkowski Applied to dpdk-next-net/main, thanks.