From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.57.20 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796124066; b=DHKASNwIF82fuxfZoSUudorTPJ8DKa5ThS/cQDDLUHsIam47Nmr3/6/Jp+FQz4omFQxd 1M9rY36QY9xqgbUVB91gfhbXw9udAJxer/kMNeGQIYV61UXxMIWasd+Fi4OJ19dpFSVdl zbJuXl926rSvlSO9Gnv+lnbz6GASSdBvR1aVkm49fckabs9pBjLRTIA6NNhPfkIstcceV x2D07H7wbT5ALBJslUBKt8CYZGfCSBJIAKmDdGUyZKGGMp6jlSWRfOWjePMvOwJJryLQL PSjLt4t8gUNMgX1dEpEswzncOvs4remPEVZTGgPywuqdgtbg9ciAGapQiloPB2x4jgQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796124066; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: Received:Received:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-NV-OnPremToCloud:X-EOPAttributedMessage: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=0Fymk1ydv38kemCHrVlExGkSz8/eWNkK9QCNxPyegBA=; b=cKolNYBdn36rDoQtqyQY50kqKnOYFpzwvThqX+7AwYQs3UfVxXY18WKjGtrafvAImia3 3On6VABOthsnJboQTOUQjnm+REfdVLNoDgWqnaByUOS/brmeaV4XghR4Bl5eW6tRYwzPu T1NTNh3yxubj52TePu83losKD+xqJkQA/vnMvhBU1vg0IEnz5dTdlEdPtVTovArIyz8a9 AmIzIhdLvauz1bzcgvQBTvM7987ucVS/5CYgAyE6sZP2/wObXJrBrBXVoaAkqcOikXqFU c5cHstHQM1jNZ/wFCR0k4jSJt2OHSF6kqUCc8E8nvG4hk4fEAA7iy/Sz4wxxjYH9j4Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=Ta+1d1Kc; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.57.20 Received: from BN8PR05CU002.outbound.protection.outlook.com (mail-eastus2azon11011020.outbound.protection.outlook.com [52.101.57.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FE02606A31A; Tue, 1 Dec 2026 11:21:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2FE02606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=Ta+1d1Kc ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UtcyQHV7ZSD0aBknC32uopPj4zdxMmePBCy/PNI4WUTJeqE0lJ6eyooP9rgVyqvHrLRS8hBZiJdGKRXKR4nGXzGbw9bpDVWkArdp/HZuBy/krqW9kSoEdvDv3pcPn7Apd64JnE5sjyxpI2jUuLuziW7RkFiELuOQQu6rcc2E++JVhgC3/nLb/MmKScEU2VZwRz/yd2Fq9smoFKZFFoVOzwvc8c+bvTP89fzpNKOoOz53OQL8NGX13O8/U+GO8uaRAgs89cJbeo5JgC6p5snglpEahqNVD9rEjFoiLUXQ0Er5mfZ438wEJ0V00ESEVDyV5LFjtjzf4k1sALxG8B7sjA== 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=0Fymk1ydv38kemCHrVlExGkSz8/eWNkK9QCNxPyegBA=; b=Vg7lLabnrqi/wkEIJHyI5Dxwe5pijcZBxrmWOWV+poZmdBE2iQU/6TiG0yoWi1p+cawSpyjXG2Bd4AVTZP7WIK+l87ryu6+S6Dqvjjv3TD9HFXJS5eFBW96YEjTXNeualwq/wEZfMLGWxrvh7YHMSed/TIuiKLwkUmHOx9qZD/WT029+VHhDAE6dvQ04kMFc6KwoWFVebLxM31MQiOLQXFiJF1hJ35S14yNsJwANJeJsz9Y9qqrz/XcPOSafDq+7M+nbNYlqsxAlPFaJpNWb1bvNqEZyxjkKlniqenDmLcTkrsTKhUil2uqY7xSGdgQstKIpqufAo/ygX0Lv49rHAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=mandelbit.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0Fymk1ydv38kemCHrVlExGkSz8/eWNkK9QCNxPyegBA=; b=Ta+1d1KckQRHDw0NeKWJZ7DCtGikN3irKDsikQp3DQkgfQeUf79ybu1FcvbTc0VRuv1sKQCJhIWGrxuq4lVkFFR/FGZJ6A8h6AUoMt03VIt6HwcSHjlOn8mF2m9REoKhyhy0gyWs/sKWC+CX/URYNI+x0qOzXFYnxc8FuXVCxJR0bKpOmhiYWUufIJSZfTKPemGVjn0bNZtwEUkLyuqwYi8VeeNqUr1fAAzQY58BnbFmhC61zbBcvMLxrbLvszTQQgJl567VPePnVlsZwjQIhco7yRFfYDFuAX+OrEXxiwnTIKQPX81dX71LblUyZ4NAUs2YnnBSKE3yGWoxeusxlg== Received: from DSZP220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:5:281::16) by PH7PR12MB5594.namprd12.prod.outlook.com (2603:10b6:510:134::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.5; Tue, 1 Dec 2026 11:20:57 +0000 Received: from DM3PEPF000265C4.namprd03.prod.outlook.com (2603:10b6:5:281:cafe::1d) by DSZP220CA0018.outlook.office365.com (2603:10b6:5:281::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.10 via Frontend Transport; Tue, 1 Dec 2026 11:20:56 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM3PEPF000265C4.mail.protection.outlook.com (10.167.23.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Tue, 1 Dec 2026 11:20:55 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Tue, 1 Dec 2026 03:20:38 -0800 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Tue, 1 Dec 2026 03:20:37 -0800 Received: from dev-l-178.mtl.nbulabs.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.2562.57 via Frontend Transport; Tue, 1 Dec 2026 03:20:32 -0800 From: Dragos Tatulea To: Antonio Quartulli CC: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path Date: Tue, 1 Dec 2026 13:20:31 +0200 Message-ID: <20261201112031.2657332-1-dtatulea@nvidia.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: <20261104195241.1883539-1-antonio@mandelbit.com> <674eb8ef-c93f-4926-a760-62df154ed3eb@mandelbit.com> <20261125215233.3422038-1-dtatulea@nvidia.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM3PEPF000265C4:EE_|PH7PR12MB5594:EE_ X-MS-Office365-Filtering-Correlation-Id: c7caee04-fec6-4b4a-2cd1-08df4f9d2ab9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|376014|7416014|23010399003|82310400026|18002099003|22082099003|56012099006|11063799006|5023799004|4143699003|261102123227099003|261022105027099003|261026140227099003|10067099003|261022075727099003|261026121527099003|261028144727099003|261021121427099003; X-Microsoft-Antispam-Message-Info: lpwLHqGMXU8CXGB2cp5twFqiakp1LdGdPEZQ5vyglpAJ5RfK/M0Xt22F6HxDShpgMY8nfe+T48UKXe8/Wg8tqp1f+xsghqpAO3UKtNoO2T7m7/xWRrTpud0wOQj/Knht3K/LdVkl6z/gEEg/Q5gGmLhBCW8tUhq/vztOsuR1YkowI05e9+/OoKHjf04r4rj5kFKEQqIUgWf1Y6xxon9onQKe6Hkkf5Li48t2BdbFBrGwLmVkBLr0pXhVYFY3Uu/A1h5wA6tououNmEZTmQEg9SSSbHnTdd8rJCcWHMqKIyN5OR/ao0pNGp7U6Ww9/4u9PBVHXwsJCAckuwtiZXjQJzLax/FtVuxA+ucd6F/yCKxxwrR+nMwV6uFTthHgtOFaJLAWyGKmDs9cFkp3qtqI3aNJ17i1qKrhMB4rnqkAF4DTYfXAdNFvA0BXB6UX+LFLvMf8NwHrZwxU8BuV5RWCiG43g3iV6fydj+BGnGNdLpAx4TZ0IxQKySEJHJJx+sRDYT0i5sLjiQ2m8x1VXxgND38WGSOu/RAx9/fWXYhBLnKNGNaWniTThzzNBXgNJ6UHNNUzCpqg+ESSob/fLFweUMjOpMS1XXQf8crZZX4yAYBlc7LvGCMtgKXDj670UpsirV6znKFJQyfTVcTffD1AMz313cCQe3syL9X0aGtPsTZCZgu5kJymXgqgc68WbZSMI87b6lJBNPyCoo6ooQecGQ== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(376014)(7416014)(23010399003)(82310400026)(18002099003)(22082099003)(56012099006)(11063799006)(5023799004)(4143699003)(261102123227099003)(261022105027099003)(261026140227099003)(10067099003)(261022075727099003)(261026121527099003)(261028144727099003)(261021121427099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E4BVDnY2c06gWg4szuL3jKaWKaKJdcisyb7pgGM0Tx+5kq2L43YordWuKP14JO0L3yIS0Kv0nJpJZhXXPrw+PgSPtnKA7qDZR3J1KzP/EBe7ZS84MCCHRBi67ZCDqceimkOWoS0le5jl+37ne7y6E7qlV1J4KRykwVDVCKGbxz1Hr75oeRkbkPIf4w78Gh7YS7Unt4RzbJzEirEQtAoX267udvIyI+gZaA0yCpIGf23QIIUzhtaPzpFVY1cQfn4SYpnceKSorv6ckydMC7oxqEyDxLvbMqoagQfRbQgsSH2VYnBIEevCWEAdhE08h7HbZZ9DPDdOpKjzRr0w/9JgiLf18KFmwFIL3vK6PopT5C0vUNuMBsA4yr0DVRdPbCz2vf+GBzHzlN3T4/y5vOlInQ3t6jyHoU0AmypDgZNMXCuWgqfAPPrfNCtS9HyK7hG7 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 11:20:55.3898 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7caee04-fec6-4b4a-2cd1-08df4f9d2ab9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM3PEPF000265C4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5594 On Thu, Nov 26, 2026 at 01:16:49 +0100, Antonio Quartulli wrote: > Hi Dragos, > > On 25/11/2026 22:52, Dragos Tatulea wrote: >> Overall I think these results are quite good. I was expecting to >> see some issues at scale but nothing really stands out to be >> honest. > > Well, thank you for running all of this on hardware I can't get my hands > on! > >> >> I wondered how much each prefetch bings and gathered some data >> about that as well on the AMD system: >> >>                           v2    without   without   without >>                                 page      headers   shinfo >>   UDP 64B flood          +7%     +7%       +3%       +7% >>   UDP 512B flood         +8%     +8%        0%       +8% >>   TCP 1 stream          +18%    +17%        0%      +18% >>   XDP_DROP read         +81%    +81%       -2%      +82% >>   XDP_DROP no-touch      -6%     -6%       -4%       -5% >>   XDP_TX               +106%   +106%       -1%      +108% >> >> It does look like the big bulk of the advantage comes from >> the header fetch. > > Agreed, for these tests. > > The skb_shared_info prefetch pays off when the stack keeps each packet > in its own skb: with TCP through an ovpn UDP tunnel on my setup it > carries most of the gain (+34% with it, +4-5% without), while plain TCP > and pktgen were within 2% either way, which matches what you see. > I was trying to reproduce this and am not able to see such a large diff. Any steps on how to reproduce this? I ran 3 ovpn tunnels over a single queue, one TCP stream per queue and was a very small diff. >> >>> I'm also testing a small follow-up: v2 doesn't prefetch when the stride >>> 4 ahead is in the next WQE, so the first strides of every WQE are never >>> prefetched. Following the WQ list to the next WQE (only when >>> cur_sz >= 2, so it is posted and its pages are allocated) removes 26-32% >>> of the remaining DRAM demand fills on the RX CPU and adds 1.8-3.3% >>> throughput, measured with TCP inside an ovpn UDP tunnel (where the RX >>> CPU is the bottleneck); its latency is the "+next" column above. >>> >>> I had planned to send it as a follow-up patch, but I can also fold it in >>> a v3, whatever you prefer once you have your results. >>> >> Do you have some results for this? > > Well... after running more extensive tests I came to the conclusion that > my follow-up is not bringing any gain, despite what I anticipated. > > Therefore I'd just keep v2 as is. > Ack. Thanks, Dragos