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 5187942478; Wed, 25 Jan 2023 17:43:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E75D542D8C; Wed, 25 Jan 2023 17:43:53 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id C6B0D42D47 for ; Wed, 25 Jan 2023 17:43:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674665033; x=1706201033; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=LEojzxvuHnS4eTKHTXvDtjkIC1xCCGgxDIbWlfc1vd8=; b=ZxALOaOmwzTA4YPMREnvCY4Aly5oEnknTKHJu+wldvLNDDXLYZxv9bqE wuivQdFsfeoq62ZA0NUMmC9lh2TsvzbsP3Fp4YFaZtmCYbZsV5JeV8r4Q ZEFQg3DTHI1lXlUcHcQn9AAINWq+eCXOoNxbDIbvytDYU0C6Y3e5rAszh 0m1LHDJlshoR8TRGXQw7GNQq0JeKyBC1nFBjr0Usx78/FJWjFuyeunZlu GOE4tXsU6p+uuEF1OioyyvT42zHkpFuye6Gfp7vpt0lydbXk1VCXLZ8L5 eLPoafYU4pDudOHcTneQrk38RQPoEemCs4L4b1i77/wmW3uy7s4rlO+sg Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10601"; a="325278379" X-IronPort-AV: E=Sophos;i="5.97,245,1669104000"; d="scan'208";a="325278379" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2023 08:43:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10601"; a="786484983" X-IronPort-AV: E=Sophos;i="5.97,245,1669104000"; d="scan'208";a="786484983" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 25 Jan 2023 08:43:29 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 25 Jan 2023 08:43:28 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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, 25 Jan 2023 08:43:28 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 25 Jan 2023 08:43:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TRINi6zuqqiMaYR5isjU2mNo4aPQhGXlrIbhPVT1+9pIpaMCCuIkyhD15ObqN8+65yPaxgHoo+cc7gMHZXmYtsU/InTVKiqnRwi8YipTo6fR7A3Dc9sVfKJFB1Qou0DW8+572RbrgoBhegmA+FgsKz6vHeeQia14YQOCT9ev/B0IRwdNyUYVWuAti1eg4Lf4rZw4WkvhrSC5OaciaetHGwYfG0h+1TLhL9obq4C5cc4DetWc02mqQHDJ1I/C2CwSnEm+Yg2d7LTQeQRN16aga9LtyiUi23A4Sjkrg7iFpB2KWzOGch4iWkL3GK3tVatIGzQXHOwYa1aDQklDIvwG4A== 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=Fo6WOUh5MVQPuGI6u5Au0KqmbcA02uWO8LDHZFE3z2M=; b=WVZbAoVyOuTuVpDAT2P6q2bDkDOlFYlknpy1lZYCkt0GAI8Ints69mrZNboR6zI6+3BexArwintzXHirR8J0AnoCI2jPiRdj40MvdpMz056w6ismHa57N/J0YaBYQYYtGUxSVPa+6UXocKSF7CqOQFnXM8/wDH33JuD8CIz20EW9U7iBD4zbbTGIwX0+Oc3hyc4+FCaPwxd8M38ECrioc2h9oelQdR8iPVzqVgBCnuOgwt9ISo/K6vRlGNNLr00Ja83UvAgBJ6o795HeegRiAdoT3zCJfTOZmgaU5dVXqq20Ab43LihsYfRqhHvt5n3EYzDBDgltoaZe8fLvWvue6g== 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 BN6PR11MB1251.namprd11.prod.outlook.com (2603:10b6:404:48::10) by CO1PR11MB4866.namprd11.prod.outlook.com (2603:10b6:303:91::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 16:43:26 +0000 Received: from BN6PR11MB1251.namprd11.prod.outlook.com ([fe80::47f1:7115:5a96:5a30]) by BN6PR11MB1251.namprd11.prod.outlook.com ([fe80::47f1:7115:5a96:5a30%8]) with mapi id 15.20.6043.021; Wed, 25 Jan 2023 16:43:26 +0000 Message-ID: Date: Wed, 25 Jan 2023 16:43:20 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.5.1 Subject: Re: [PATCH v2] net/af_xdp: AF_XDP PMD CNI Integration To: Shibin Koikkara Reeny , , CC: , References: <20221214154102.1521489-1-shibin.koikkara.reeny@intel.com> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: <20221214154102.1521489-1-shibin.koikkara.reeny@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0064.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1::28) To BN6PR11MB1251.namprd11.prod.outlook.com (2603:10b6:404:48::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR11MB1251:EE_|CO1PR11MB4866:EE_ X-MS-Office365-Filtering-Correlation-Id: b82039ad-e2a7-48d2-aeb0-08dafef347b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZJdOHvScbssWzqKYrRahipM/23l/6J2SoQeQYEDjayYqvtCfF3tQkp36ye/z81n08iZBAvq4yNqK4kGneWcFU7qxmZlqebDyS476QtZDZ6ebNjME44GNR0+AA2SiTc64mTRdwnFZmkg6WPvdcSMQbGp068mlmxQJp6COEVK2MHWtHEmhBpM9km4InGLxizXsosi4czMQ4kUTUojSd91S2uHLDql1kgz4ng08ccm/gY7No6oCl02cC7V+JfGThlbW6qNHDVeXNrfr+AiYis9pa5dI37PywR2MV7WRIjjEXrJjxbCvpp807Jrfg9GttUqlYswkla5OO+37fG1M7daKcRlHNB+8DJdIqzt1p5mXxSSsH/B90k0jy7l/ynCXx962T/UzZBy4ifpYm957gbW/T19NaPcFz58O3NTL4xtZrZkRgex5FnQPkitGnJrUbtEoll9NAAkBRUX179fqJatMWlUUCzPUnmy9xC2UnDSELF5q/kXxT45QGh6it2WeeNatDznCVRaEk+NSM1FRoVBX8Fgs/j5ERFs3hWD0mYxb+d2fz/MfsDknV7g5/9v4k1wVow51qUmWGnwVU6jHh18ljuGzm5/8TE9MmrY4AZK+rYY4Wr6VJ5GgNbHncU76xjLT8O9xw5t7oFs23fZdxOi7w0IQS9LVbiwMza1fjmb3kmFTNLyN9qKnupu+7Je3GfmIlHdOpuVQoB5AGtfXM3OCc/wFt7zqI71kAgxbHcQU8AA49MuHNL6bp1TPy/lLXIanKdW7l0gL2BouRg41SjrASA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB1251.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(39860400002)(396003)(346002)(366004)(376002)(136003)(451199018)(83380400001)(38100700002)(26005)(82960400001)(5660300002)(2906002)(41300700001)(86362001)(4326008)(8936002)(6512007)(316002)(6666004)(6506007)(186003)(8676002)(66476007)(107886003)(66556008)(2616005)(53546011)(478600001)(6636002)(66946007)(966005)(36756003)(31696002)(6486002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?REtIaFd3bmR5cFlTTWtEY3k1K0QvdE9WZTB3SlBSdWV1SU8rdUdYeVhCc29W?= =?utf-8?B?d3loWG1Ob0VXNUpyN09DTlNYQmR1TTRYamlIWHcrQ1E3MzZyZEg3cTJDVUlv?= =?utf-8?B?LzNCeXord2hRSCszbEJndUcxSEQ4MTBRbVBvb1RQWWdTWE9VWC9mb3RzbHRE?= =?utf-8?B?Z0IycW9LT1FKOTgxRWFVQ1AxZm93SWtMR1UybU4zbkZadjlzRnR0SWtJTk13?= =?utf-8?B?am9TT1liQkFHblp1T1hCWVkvcmcyME44RUFIbTZzYllla3ZacDN1NXZIUFdP?= =?utf-8?B?d09ESHZVZ2htOTM4WWtVTkFBNlBkUHE1WVJlbUg0S3luRlZOdnBUblR5M2Ru?= =?utf-8?B?TTZlVlRRc2twOVFyaTJXRlVIaC9IV3h4amphdWdsZWRJQUFvTW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-MS-Exchange-CrossTenant-Network-Message-Id: b82039ad-e2a7-48d2-aeb0-08dafef347b0 X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB1251.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 16:43:26.2115 (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: NyZajKEatKNkTtNXVO8MqZK63a0SC2ZcKoE2FyiKsfMAklskuHCcVniPCiX+AOxInaBkL9OPyI2KpggZZJ/NXKj1zPBMYpidsv/PBhK+hGw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4866 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 12/14/2022 3:41 PM, Shibin Koikkara Reeny wrote: > Integrate support for the AF_XDP CNI and device plugin [1] 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. > > [1]: https://github.com/intel/afxdp-plugins-for-kubernetes > > Signed-off-by: Shibin Koikkara Reeny > --- Tested-by: Anatoly Burakov The testing setup is a bit involved, but everything seems to work once all the pieces fall into place. -- Thanks, Anatoly