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 4AC284240D; Wed, 18 Jan 2023 13:11:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39429400D6; Wed, 18 Jan 2023 13:11:23 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C611F4003F for ; Wed, 18 Jan 2023 13:11:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674043882; x=1705579882; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=sJm1Z1nw5EfJ3yl15zD1ffq+0fS+bMhGl8q+FTGHUQI=; b=hSMqwoumIp5JdaJEh2YNbZI3OOygaPMysR08le2sTLxudS1b2eT+PBdt v5Zv1rWQ0MKwUqo43G0/SoIQSXOFkjrWR+J2brnzguNSs7W15QKC3fB9X F9fSKP+Ga/kas5sBwxwRgKMOqNwTXWyuC4Hm//+re3ui9Bp+hxO15U3YW n9EPoZrAotPa/PfC3egUAungJkDI1BO2SIH95FJyFyiopYHSQNT34vRb1 8AGcu9sZOQnXo9GiFht6DkUKnk08FPdLHdOjWJqJ+cVur4tBsmsqPQBdl W4YmHi8YsT6h/yF9wrxzfnF82vn/sJOmYGfmXfbQf9rZqRgV/vj+/1+th g==; X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="352215296" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="352215296" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 04:11:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="609631182" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="609631182" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 18 Jan 2023 04:11:20 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 18 Jan 2023 04:11:20 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 18 Jan 2023 04:11:20 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 18 Jan 2023 04:11:20 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) 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.2507.16; Wed, 18 Jan 2023 04:11:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DZmRQlp+OYsQsrC5eRemlWMyJYPZqZQm8xJ7P23+QOQF4nH7vUHKJoN/jqlNyGkhbOGz2mRgQUAup+DTSc2liwJSBNw/T/2JiAfx6FzkRQFRQnjUjMh8K0rWpJiI9oiPczWs8MmludfaP94Oab7v1vrvZCAIRBp0ED9lujtHd7VIsKw6fpzXUqlBszqDCcNo/7Dyv6OQbznpl9n/VRchFYcw0v39sZMLrEFafAVEFNATws1ux3ejr+IKkfdzfM2vzmLUh99yH75W3xsLnmS5AfExZWegoDmOQ1B4VrqCv0yjuXthm8K77RLD8nMIBUm4dLPOYqLXe4ZA61UnIGqUig== 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=bPqZf02ps1hZKQb8RuDn6RNhEvfdhuaWdgrU2qpjpi8=; b=PP3dMLmiBnNsuG1CPRchwX/ErTR7EalbXXCo64yWTn3ewZF85tVK1R+Rq94jQ/KAzycoVA95fvJX+blJ2ROWfREcuWJhLh1kTKWGhcAYD4BSftm7SBB+liWJ8LK552VZQaFoA7kaV1USYj0pBF8NRAGPX8MyaPwYI1t0OkUWUd67nCMc7QJGV8/n/kj6SQsIdTcpjtgn5KUQDwv+BDEVpGkqfLCfuJUM25Gl62Z3mnOY3ZgtnSF2f49Lr6QNZP+jFkMKur4uTTTFFEE2WmiOeJtFNWY1f/U1+4A/JQMdtBACj4/5XYPbBL/oMYF0CZt9WXjznO23LpH9ALonxr6+Lw== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH0PR11MB7710.namprd11.prod.outlook.com (2603:10b6:510:298::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Wed, 18 Jan 2023 12:11:18 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee%7]) with mapi id 15.20.5986.023; Wed, 18 Jan 2023 12:11:18 +0000 Date: Wed, 18 Jan 2023 12:11:11 +0000 From: Bruce Richardson To: "Koikkara Reeny, Shibin" CC: , , , Subject: Re: [PATCH] net/af_xdp: AF_XDP PMD CNI Integration Message-ID: References: <20221213104746.805221-1-shibin.koikkara.reeny@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20221213104746.805221-1-shibin.koikkara.reeny@intel.com> X-ClientProxiedBy: LO2P123CA0084.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH0PR11MB7710:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f237299-90ef-48c6-5395-08daf94d1a67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jm85cIoPKnLM9nbJ1x7gjP9f3hxCuJsGSnWhZXaoHLkNkmZRwQRozvpqqFbzE3rRP58AnaCaW6ZYKKH9lM0vL6E4pR24/JGkgmsl2Gm0rFkpp4yrjhLqLic+4w7ZTcYP+h7/WLoO8zBAAz6aOmPHw6dSkpBRgHYJUgriAennxL7ZgStHLajLQ2MR4nlL1SoVanifEM3VZjuvEDcn7cso4WaGFDlodJzhs4+pxXNlGqKKOIyCEDybr0/rMjhwV0JmnAiUdXLZWlVlR9J3NGnDdzE7CkLevPmdTUR8/H2mX4kSOK9psRnKRcVd3rL8bJpJU6U2PeE3A8GT7tsWuPwUfJsMu7V9NI6NBLfsyo8lHmfUU3E9EOBnsVtEA+KO1P7uL9q4hrmdxKTlRc2wwuPBzWsXQIp9hiNdtBuVua1nydU7nOciOcKjap0kQzW2HYFD0KEbRNbBphha2bYNsdSKc47pc5NiSGhrDB/krPPP/QGcVXaEp2lwpr6D3Je5vz9n02/DAbZDyLo++xtktW27IufjJ8/qRjW5ajnMKOpW5UokZVQbIHUNafBQ383QPOco4GRNzAtLWWIWWz5Z5z4I9CMqpv1aYQVJPAOIJmKuckxKAuT3GRl0vQdbe3SjKThUOZ+G3jSY6JDSorQjNOOF6zErr0AP26bhAjtLN90NP7nx5PYKhQb3Zq3FUTzOKmEH X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(366004)(39860400002)(396003)(136003)(346002)(451199015)(83380400001)(82960400001)(38100700002)(44832011)(8936002)(4326008)(86362001)(2906002)(66946007)(5660300002)(66476007)(66556008)(6862004)(41300700001)(107886003)(186003)(6506007)(26005)(6666004)(8676002)(478600001)(6486002)(316002)(6636002)(6512007)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2F9UEzzvKQKyLDeo4Swkpb8WRbnAhysFvetHzk4Sq0ttKhBqhDpcDvCeUrMx?= =?us-ascii?Q?Yh9h4fwRpUby+B/M2dM+4fjFVsXlqxFlBM0k2/T/nQUFfJEb/ytkdB3714f9?= =?us-ascii?Q?0RHEcqNr+tExlVt+5uP2KuNpxSfsM+AUMdN4vlXebWTZAXR5YxGNveXt70NV?= =?us-ascii?Q?tPteZ7DrYedu8k3gFzXn8LaiMeLRXBY9IO/zV0tXuNLs1sBWSKxUIRUb1+xU?= =?us-ascii?Q?IgD8DIcpdufFUZOU2hklbWWfAKxJAxz+mPWopZxXfzynu4xJDB43gC7BhJVf?= =?us-ascii?Q?RZ+U5NMSj5UnlZs0Iz7cXpf/tZ6GDUs4gOXXUsMwFnIzGTidvn/zr3LFi8g1?= =?us-ascii?Q?43OvacIkFVNrV2m0dGQOYFFWsMbSIdC/z7Jg+91E5691ppDTcKX1rawXHj49?= =?us-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rDszZl9mCgnYa7ZxDnJAh?= =?us-ascii?Q?7gaw4I2RPDcxrqYtWo8FQGpyg33sBLirElKpqCceb7+Kyt5UlCEM8G9iaS0F?= =?us-ascii?Q?FQIS4uPF2ztZO0bPzRg8rrYzjtsamXZxAubt19+KQWMBwWjfINtxJtLtsts8?= =?us-ascii?Q?+8ndhc45ZPzPc6QqCX+btbqIidN7ZL6TDl0b5Ai2dtBSg0SbFLk4CQPloEf6?= =?us-ascii?Q?yLLB05XMj3JFDPRptkbi4VibNJGuzflAOc6wGzszwlmMJkpRfcAsk/uZ+ufR?= =?us-ascii?Q?Kdy7HXtG8l+ZzOfE3snLaMzyKeJqzlY7fe1C3FgANDVqMmrhJojer4kHvkVO?= =?us-ascii?Q?Kw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2f237299-90ef-48c6-5395-08daf94d1a67 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 12:11:17.9936 (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: uRX6i4uxhxr+RVmQYZh3PmZsh3TuKOXAhMkzskD+L/WpjmLTUool6ZYNuW24M72pfapLje+uk0Vd/ZMX9ZeNGdo56HRgxVV5K/8yELcC3cA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7710 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 Tue, Dec 13, 2022 at 10:47:46AM +0000, Koikkara Reeny, Shibin wrote: > From: Shibin Koikkara Reeny > > Integrate support for the AF_XDP CNI and device plugin so that the > DPDK AF_XDP PMD can work in an unprivileged container environment. > Part of the AF_XDP PMD initialization process involves loading > an eBPF program onto the given netdev. This operation requires > privileges, which prevents the PMD from being able to work in an > unprivileged container (without root access). The plugin CNI handles > the program loading. CNI open Unix Domain Socket (UDS) and waits > listening for a client to make requests over that UDS. The client(DPDK) > connects and a "handshake" occurs, then the File Descriptor which points > to the XSKMAP associated with the loaded eBPF program is handed over > to the client. The client can then proceed with creating an AF_XDP > socket and inserting the socket into the XSKMAP pointed to by the > FD received on the UDS. > > A new vdev arg "use_cni" is created to indicate user wishes to run > the PMD in unprivileged mode and to receive the XSKMAP FD from the CNI. > When this flag is set, the XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD libbpf flag > should be used when creating the socket, which tells libbpf not to load the > default libbpf program on the netdev. We tell libbpf not to do this because > the loading is handled by the CNI in this scenario. > > Signed-off-by: Shibin Koikkara Reeny > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 337 +++++++++++++++++++++++++++- > 1 file changed, 325 insertions(+), 12 deletions(-) > Hi Shibhin, this support sounds really interesting, but I think the patch needs to include documentation updates on how to set up and use this feature. No need to duplicate instructions that may be already given in the CNI/plugin docs, but we need to at least reference those from our docs to ensure end users can quickly find out how to work with this. Thanks, /Bruce