From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mail.toke.dk (Postfix) with ESMTPS id 8035AA8112B for ; Tue, 13 Aug 2024 16:09:56 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=mHeFXcrH DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723558197; x=1755094197; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=JV81lN8BVqgwZmH1OVNy+P+HyUVi1X7FSyzA88alNp0=; b=mHeFXcrHZYPvpCZ810gAMjpZw9s1/CreMp7EvTKcmkcu9L87ZFXDZUos MXHgQU2UgFo3NP7vRVHKUNwqq61vF0uOjsoAGaVNMbjShFZyTI+xo7SqX aCKyV+UagIwn2wf6CiJ37WzOnj5pPZpTcQQaSlttF5VLjMK8q/6iQw41I X5Ku4KUtmQNib6sBJRgOaws33j5CY9U+JdKlzM0JcnWi1/Q28pMx0bJ1t xKKP2cxubT7B8L8BNaySaPvDsRKSejabSqKSrs+Y/0TpmZ7oIP9vQ9ZuF 2gUrQdlNosshUXXAd3btoL9q8rnPwG6hWvvuJDzCF5AfJ5HVNo74lLzqr g==; X-CSE-ConnectionGUID: AMwyfPzyTmq4vJIXCcAwpA== X-CSE-MsgGUID: rU0Vp6pXQ6yxHQLETEVy1w== X-IronPort-AV: E=McAfee;i="6700,10204,11163"; a="33128416" X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="33128416" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2024 07:09:53 -0700 X-CSE-ConnectionGUID: P64TMDwiTxmnsskREggGng== X-CSE-MsgGUID: yQxalBoqQlmtglsFkav25g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,286,1716274800"; d="scan'208";a="58763822" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Aug 2024 07:09:52 -0700 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.39; Tue, 13 Aug 2024 07:09:51 -0700 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.39; Tue, 13 Aug 2024 07:09:50 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.39 via Frontend Transport; Tue, 13 Aug 2024 07:09:50 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.41) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 13 Aug 2024 07:09:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Cw0eBTLNb5XHjB5nBIfSTjxMsdOu3Xx/EjcTWXBcggjS5yJGoWJ00mqJAU1H5n8JFjykdSuKAsTWD2SZ5N37SSZMvFgBMygRMf8pwmk/bTUJkyE4yBGg6ODQqouJYl1CrS51NMtOfJAZEYWoBG4Q6VnEF2YaViG+PElga1yk/5YsO1rW71mPvukI9Y93oUHmaMHGCysaK8EDbe08zpjXpZfb0wjoR288t6CJ5pmYUAVUyv2sOkcrwAnQgh58jG6xs1PeMlak0FcoKmjPSG2GU3+eRYTx2kfPFAWXpWgx5rZLpS1B/T1JV5I2wx+6QaBt91+z2K3gTFqVJnlu0xSEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=4fznTk1+1CmknwXwq6gWX55ZZzH1G3iMPyLh9PoE6yU=; b=aZiIeMXjqAPHMR6bZPDl7Sr5A+UHmAuFmeG2/NjKVe3C3JGkNwA1JOhuv74dr3Jmmpt1NWNOHnXUi6+zcjC/A9cuOW02PC/vtd2SQoKtQkmeb9uzRKQYb6LH8ONV8/fCoVK9i80yQGEjqJ7KAdxt2vFeXOO6Fq/kEyjnTZXgF/ur/SfRkUOC/+bk7W5chZgSUW48NNol6VBisRKNLMRIh9Qh0KcSuX/MUoBgqOmnmhyiBkNeIe2Xy/1ZXn22V1ndv31cJ7jhOV+U4pn3gxvwBM2Fe80cwzchVk7TaYYr+QWiqRw0aC7rFsWaXqtP/prffU7JERjGel0tyXE8VGNktQ== 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 DS0PR11MB8718.namprd11.prod.outlook.com (2603:10b6:8:1b9::20) by SN7PR11MB6851.namprd11.prod.outlook.com (2603:10b6:806:2a3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.29; Tue, 13 Aug 2024 14:09:47 +0000 Received: from DS0PR11MB8718.namprd11.prod.outlook.com ([fe80::4b3b:9dbe:f68c:d808]) by DS0PR11MB8718.namprd11.prod.outlook.com ([fe80::4b3b:9dbe:f68c:d808%5]) with mapi id 15.20.7828.031; Tue, 13 Aug 2024 14:09:46 +0000 Message-ID: Date: Tue, 13 Aug 2024 16:09:38 +0200 User-Agent: Mozilla Thunderbird From: Alexander Lobakin To: Lorenzo Bianconi , Daniel Xu References: <20220628194812.1453059-1-alexandr.lobakin@intel.com> <20220628194812.1453059-33-alexandr.lobakin@intel.com> <54aab7ec-80e9-44fd-8249-fe0cabda0393@intel.com> Content-Language: en-US In-Reply-To: <54aab7ec-80e9-44fd-8249-fe0cabda0393@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ZR0P278CA0013.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::23) To DS0PR11MB8718.namprd11.prod.outlook.com (2603:10b6:8:1b9::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB8718:EE_|SN7PR11MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: f9cfc97c-c43c-4b8a-690d-08dcbba1964b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bXQ3eWduRkVRWnlrZ05xVWRReFphdGJ0S0ozY3BsREFyVjRFZm1YdTZFV0FF?= =?utf-8?B?aE5nVFc3d2JFL2Y3TktWU3NENE9PTmJqd2x5aHAzYldEK1djejFMTDFxbGhM?= =?utf-8?B?VnFpTmFSblp6TjBHQy9nUzZVRjFWMFNwUDVzSG81emhKUkw3dHI3aXhCMG1l?= =?utf-8?B?VDM5dVpQT2hMZFdGWmRtV1dMdENYbys5YUJKRWpWcG1Hd21EelRhYlZOemg2?= =?utf-8?B?dERSWnFQdTV4Z0RwTGFLaVluV3pDT2t6Tkp6VXU4MDBqMmhDay9DS0pDUWpa?= =?utf-8?B?M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duQ09Oa2F1?= =?utf-8?B?SEptNmg3K21EVEZnZ0t2MTA4TTE5Y1RhZ1NaejJ5cEU5VXZzVHVJWUtxTVR5?= =?utf-8?B?bk41bnlxVTNNdGtHV212NGxyMGxLSW1sLzJiY0x1aTNGVm1tK0VQWDV2WjZl?= =?utf-8?B?akVHbnVTeDlRM1pEMkhkTnRzbkEwU3NzTXhnKzFxOTY0V2JnWXlsNUQrMUtu?= =?utf-8?B?dUdEOG41MHhUY0lIem9JWEVEMit0dGJPYVlvNE1DU2d3TldTZ2FyS2s0R1BU?= =?utf-8?B?Qy9zTytUTlExby92Ync4eEJWbk9aNm5aZFluMUpjSEZUb2ExZjBrWTEwWEl0?= =?utf-8?B?eFhBZ2NyeG9TUFdnY0svRG9nMFV6UFd3NVBDM1EyR3JEd2lycVpDZkN2Ukgx?= =?utf-8?B?YXpzTHFZZTcxNzYyNC9FaDFxZkY1MGg2UjIxT1p3VGNJMmxiUGdiRUw4d0NU?= =?utf-8?B?RmwxdjlZMEhvdFJoWmdDeWhyVyt0UVVCZlBSdjlrSlpLbENKcW41VUJRVThT?= =?utf-8?B?WkRaQlVkcmhPWENtYlZ6UFlreERwL0hoVW1md3NNNTlIN1pnQmpQcnY4VXNR?= =?utf-8?Q?bCEHs8zmwjO1ohG3ZHxC2ux7kUaOq/1Ht10wJr5?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB8718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RzlZMkErZzgvTHNEUEZTdzBoS3FSUWhUYi9lMEtCTncwdHVnYldoQzZxUWVM?= =?utf-8?B?bGNOdit5TG9PSktVeGVtVGpSL1JEOFQyU1RzVUpVN1lNQU9TYkV0TDZU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GMWFpb3ZOcnY1cTFUTTdtdFhDTmhqRDBuYjg0ZmJRankw?= =?utf-8?B?eXI2cG0zWXBoRDlzL3l3ZXRNMnM5RUtKaTAzSnVxRHFpY2R5YkFONEJvbThl?= =?utf-8?B?L3JBRFpVdER2SWV2cWxZVTl1eEtMb280WUNTRzA3U3FSalJ0Ty84T2s0SHMv?= =?utf-8?B?ZlA2OFNKK3MxaGNzYlFlZVBaYldreTJjU25hRGRlSmlZOWhIenV3alU0bE5C?= =?utf-8?B?WFZXVFFMaFE1QmNhdVF6THJTOGVhcW5Gd0JQb3NmRUZwV3dNbGZyNDhFbnE0?= =?utf-8?B?bHc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: f9cfc97c-c43c-4b8a-690d-08dcbba1964b X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB8718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 14:09:46.7436 (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: iFppGWx2Cks7/h9IJSVvA/3UuNQZvduHzpNAmfys+GG+tHuJISKzXQD56S5uPbOY41T0tlIed+qtNWUVhbNK2efVnq8t6KEKcHOTYs8VJj4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6851 X-OriginatorOrg: intel.com Message-ID-Hash: FCQ4DVUA35UB6SJTDKS534KRB5DAJTAZ X-Message-ID-Hash: FCQ4DVUA35UB6SJTDKS534KRB5DAJTAZ X-MailFrom: aleksander.lobakin@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alexander Lobakin , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Larysa Zaremba , Michal Swiatkowski , Jesper Dangaard Brouer , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , "toke@redhat.com" , Lorenzo Bianconi , David Miller , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jesse Brandeburg , John Fastabend , Yajun Deng , Willem de Bruijn , "bpf@vger.kernel.org" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xdp-hints@xdp-project.net X-Mailman-Version: 3.3.9 Precedence: list Subject: [xdp-hints] Re: [PATCH RFC bpf-next 32/52] bpf, cpumap: switch to GRO from netif_receive_skb_list() List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Alexander Lobakin Date: Thu, 8 Aug 2024 13:57:00 +0200 > From: Lorenzo Bianconi > Date: Thu, 8 Aug 2024 06:54:06 +0200 > >>> Hi Alexander, >>> >>> On Tue, Jun 28, 2022, at 12:47 PM, Alexander Lobakin wrote: >>>> cpumap has its own BH context based on kthread. It has a sane batch >>>> size of 8 frames per one cycle. >>>> GRO can be used on its own, adjust cpumap calls to the >>>> upper stack to use GRO API instead of netif_receive_skb_list() which >>>> processes skbs by batches, but doesn't involve GRO layer at all. >>>> It is most beneficial when a NIC which frame come from is XDP >>>> generic metadata-enabled, but in plenty of tests GRO performs better >>>> than listed receiving even given that it has to calculate full frame >>>> checksums on CPU. >>>> As GRO passes the skbs to the upper stack in the batches of >>>> @gro_normal_batch, i.e. 8 by default, and @skb->dev point to the >>>> device where the frame comes from, it is enough to disable GRO >>>> netdev feature on it to completely restore the original behaviour: >>>> untouched frames will be being bulked and passed to the upper stack >>>> by 8, as it was with netif_receive_skb_list(). >>>> >>>> Signed-off-by: Alexander Lobakin >>>> --- >>>> kernel/bpf/cpumap.c | 43 ++++++++++++++++++++++++++++++++++++++----- >>>> 1 file changed, 38 insertions(+), 5 deletions(-) >>>> >>> >>> AFAICT the cpumap + GRO is a good standalone improvement. I think >>> cpumap is still missing this. > > The only concern for having GRO in cpumap without metadata from the NIC > descriptor was that when the checksum status is missing, GRO calculates > the checksum on CPU, which is not really fast. > But I remember sometimes GRO was faster despite that. > >>> >>> I have a production use case for this now. We want to do some intelligent >>> RX steering and I think GRO would help over list-ified receive in some cases. >>> We would prefer steer in HW (and thus get existing GRO support) but not all >>> our NICs support it. So we need a software fallback. >>> >>> Are you still interested in merging the cpumap + GRO patches? > > For sure I can revive this part. I was planning to get back to this > branch and pick patches which were not related to XDP hints and send > them separately. > >> >> Hi Daniel and Alex, >> >> Recently I worked on a PoC to add GRO support to cpumap codebase: >> - https://github.com/LorenzoBianconi/bpf-next/commit/a4b8264d5000ecf016da5a2dd9ac302deaf38b3e >> Here I added GRO support to cpumap through gro-cells. >> - https://github.com/LorenzoBianconi/bpf-next/commit/da6cb32a4674aa72401c7414c9a8a0775ef41a55 >> Here I added GRO support to cpumap trough napi-threaded APIs (with a some >> changes to them). > > Hmm, when I was testing it, adding a whole NAPI to cpumap was sorta > overkill, that's why I separated GRO structure from &napi_struct. > > Let me maybe find some free time, I would then test all 3 solutions > (mine, gro_cells, threaded NAPI) and pick/send the best? > >> >> Please note I have not run any performance tests so far, just verified it does >> not crash (I was planning to resume this work soon). Please let me know if it >> works for you. I did tests on both threaded NAPI for cpumap and my old implementation with a traffic generator and I have the following (in Kpps): direct Rx direct GRO cpumap cpumap GRO baseline 2900 5800 2700 2700 (N/A) threaded 2300 4000 old GRO 2300 4000 IOW, 1. There are no differences in perf between Lorenzo's threaded NAPI GRO implementation and my old implementation, but Lorenzo's is also a very nice cleanup as it switches cpumap to threaded NAPI completely and the final diffstat even removes more lines than adds, while mine adds a bunch of lines and refactors a couple hundred, so I'd go with his variant. 2. After switching to NAPI, the performance without GRO decreases (2.3 Mpps vs 2.7 Mpps), but after enabling GRO the perf increases hugely (4 Mpps vs 2.7 Mpps) even though the CPU needs to compute checksums manually. Note that the code is not polished to the top and I also have a good improvement for allocating skb heads from the percpu NAPI cache in my old tree which I'm planning to add to the series, so the final improvement will be even bigger. + after we find how to pass checksum hint to cpumap, it will be yet another big improvement for GRO (current code won't benefit from this at all) To Lorenzo: Would it be fine if I prepare a series containing your patch for threaded NAPI for cpumap (I'd polish it and break into 2 or 3) + skb allocation optimization and send it OR you wanted to send this on your own? I'm fine with either, in the first case, everything would land within one series with the respective credits; in case of the latter, I'd need to send a followup :) >> >> Regards, >> Lorenzo >> >>> >>> Thanks, >>> Daniel Thanks, Olek