🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25337

Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path

#25337
From: Antonio Quartulli
Date: Tue, 01 Dec 2026 14:29
49 lines
10696 bytes
Hi Alexandre,

On 26/11/2026 14:43, Alexandre Cassen wrote:
> setup is Xeon Gold 6342 (DDIO) wiht ConnectX-7 (fw 28.48.1000): 2 ports
> x 8 queues. 5G UPF in XDP (GTP-U and MAP-E, ~3200 insns per packet,
> XDP_TX only) with 100k sessions running live mobile network traffic
> pattern.

Thanks a lot for testing this on a DDIO system with CX-7!
This is exactly the data I was missing :-)

> With DDIO the gain depends on the history of the RQ. Under XDP a stride
> is a page. While the pages of a WQE are adjacent the L1 stride
> prefetcher fetches the next packet by itself. Once XDP_TX completions
> overflow the page pool cache then pages come back shuffled where the
> vanilla driver loses 5%.

Interesting...That fits the idea behind the patch: once the pages of a
WQE are no longer adjacent, only the explicit look-ahead can still find
the next packet.

> cosmetics: BIT(rq->mpwqe.page_shift) - 1

Agreed, I'll switch to BIT() if a v3 is needed..

> For our tunneling use-case I just added:
>
> +       net_prefetch(va + rq->buff.headroom + 128);

Makes sense for GTP-U, where the inner headers you parse start beyond
the first two lines.
This said, I'd keep the driver at the outer headers, though: for
untunnelled traffic the extra line is never touched, and the right
amount depends on the encapsulation.

> I will run production with your patch with the +128 for our stuff...
> thanks for that !

Thank you! Please let us know how it behaves! :-)


Cheers,

--
Antonio Quartulli

Mandelbit Srl
https://www.mandelbit.com
Technical Details
Message-ID: <20261201142903.1791860-1-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375164-linux-kernel-netdev=dewy.ru
References: <20261104195241.1883539-1-antonio@mandelbit.com> <c3f3dd4c-5dfa-4fb0-9a64-016192be5782@corp.free.fr>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375164-linux-kernel-netdev=dewy.ru
From: antonio@mandelbit.com (Antonio Quartulli)
Newsgroups: linux.kernel.netdev
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 15:29:02 +0100
Organization: Usenet Network
Message-ID: <20261201142903.1791860-1-antonio@mandelbit.com>
References: <20261104195241.1883539-1-antonio@mandelbit.com> <c3f3dd4c-5dfa-4fb0-9a64-016192be5782@corp.free.fr>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="1735288"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5zcbFJSpXtq5n0gQ48x+6TwjQh8= sha256:6gyZ/CCPGmDEXlhpLfzWxU2h+5ujCA5SSHlbFahDink= sha1:VZnZaZutDWiF5v/+oN/DAojQd2E= sha256:5sby5EF0KkDII3NVpsWVC6AfIuaoP0gwU4quLsdXgVY=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 21B941173E8; Tue,  1 Dec 2026 17:29:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=mandelbit.com
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ps9l5gZITwIg; Tue,  1 Dec 2026 17:29:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375164-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id BB9EF1173E0; Tue,  1 Dec 2026 17:29:32 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 69B0525662; Tue,  1 Dec 2026 14:29:30 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796135359; b=l/RICERQdL4MBtm0bMQkZ8/4uqLYfLca75ojoxqdNCwQWP2Kp6iB/SGmMc7Y4RZtmOPm +Zjlv6i71J/9aR1YlINPTEUPxyYr3uCUjpklSprTPmUvzx1SkwczT4FQeCdAMXkhPG2bc ES6BmUSCg5OXsmbhq2SXeontZDv+j3Y3HSyJwh6t7JDI2Ht9aX7IRbF0CdTr66BoLT9mo jLklahVA0N2F+qUfIdF0XYAj/V8gvXiYJUWlivX4RszC/5wUSAoKVCi6dI9Y1rS5MmHmA c5VvxfsTIEFne20jg6mIEbzBTgZ6vMRUO9B26EYHTtCeKSVnkqOQ9ZyhTTuo44d1sHA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796135359; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=5T8UIMH0DIlSDCHbclznas6Q0aOWfl7xZ5OGbFqno7Q=; b=CZ61Bhq6uFBBgA9fwJLDntnvqpD/GFvj5dayVGEi8gOK+XwZvS5kc4uaUGVs0+5Yt0+a cAAA/A5N8Y/AI/mmZ2xegMcgeyqorXzFpogL8tAuiEUQNkQbqCORM83z3PKEAEMSVkEJB kXyjuT2W/UOoaCDBiRrt2xoc0SVtIsaEXTuvcO4XP2I66txzm5VWsxo9riZTr6RtvRxf7 eVJfnVSuwb1jWQj6QtQ39nTHThapEf0FWEU7obnrNz+5YkpUL/Oq5/JZgKwnSiJQkcxRq d1otSX5WdHiHLXIkHF+XL6DLvtO/BgxvG7kys8odlC5OFwXWluIhnW+NgI2G0/MWy0A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=pTLpqmEt; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C18A9606A68B; Tue,  1 Dec 2026 14:29:19 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=pTLpqmEt
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.40
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796135353; b=N8YeiUJoxre4XT3JVNY4eSgfsS+mlCbNqb52/LvqANaxWF+I3je1hEBAybJdiLhK2SS4 /M5icnrxhD049hTmiYz63g12EuwS0wogXL5IstcNo+okAjakoqKoc8vd5XXhYSC5/gAh1 9NSgtTKpjz3SXK+tmAP58PPRCwxu92tI33En00IU0VVHj/wKTzh5SbgGA56/EWivprBxI wkUZAZ1baXGsXz2PVihvN6J5mzZ0DwANC9gE9rfEnMReH6N2sGl3JqZP4N0bN45LGsXT4 9tPZCfMmDu3QyXYUlzqyf1FdqpYEn6YqB+YFf/b5D5K8ioSpQ59wFPCsNMlKfWb4oww==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796135353; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=5T8UIMH0DIlSDCHbclznas6Q0aOWfl7xZ5OGbFqno7Q=; b=wXrdp8jfgn4uwIASavpzxVOlLTwCeDOV0UpSuy1Iz2BRKSrw5qVdTyZrrfIweqtOALXB yR7QeGgI6SfAgzVWJ/11Dw74ma6R7ERxv3yPSJ/INKFJdm+lT76x9UFGt837Xm3z5fSY8 bh6GvZ+2JWwYbqKhKQ+PC8+CPE07WrInsVudiwQh+dv9vSF15aoG9kGIUOR00JZohEFVV 8IvW06PovW9XGJys3yebDIpclBqZgFzgazrNLE7pqSWNXtrTkM+63rLpmV2B12syBMCyY y06ixuNF0ZvdGgsmrXMGsI9TwtrnasX3ea5PhmeOFYSRLivDniHvEMOItxf8ub68YkQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=pTLpqmEt; arc=none smtp.remote-ip=195.10.208.40
X-Received: from mout-b-210.mailbox.org (mout-b-210.mailbox.org [195.10.208.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E48D0606A6B6; Tue,  1 Dec 2026 14:29:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E48D0606A6B6
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com
X-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-210.mailbox.org (Postfix) with ESMTPS id 4jf3DN5fZ2zFpVG; Tue, 01 Dec 2026 15:29:08 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796135348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5T8UIMH0DIlSDCHbclznas6Q0aOWfl7xZ5OGbFqno7Q=; b=pTLpqmEtVYK++Lg3QUV+salgV4uBQZnHJ8rqMw7QgnuFeq7opGTqkNu7L+F2qh6k4e8qdO uJAgQIhgvvgXVyWUTO6amdgCyiFBVvpsHxLsgChueT3zRUsf4XFxc39+qj3g84u3ewSTkJ 1vApPnCjkP5reP6YcwEKJvVU7ThnxOP2I/WTztlsW66XXf+LWeFh3senRvjJu/jDMWLd62 mv4n/VNX6V3hyNAmqI8zxfebQBPGoMaBL5aOZbz/6IJak8GaTLhZ5D5G+8WoLvH3LcxrMz ZsXv07oweQol+czGnZ3lYeQlBjUwbgpRuG+nM8eZN2RaHBAuU7DI6/kTZEp2Ew==
X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=antonio@mandelbit.com
X-Cc: Antonio Quartulli <antonio@mandelbit.com>, netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, leon@kernel.org, dtatulea@nvidia.com, cratiu@nvidia.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.56.1
X-In-Reply-To: <c3f3dd4c-5dfa-4fb0-9a64-016192be5782@corp.free.fr>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Rspamd-Queue-Id: 4jf3DN5fZ2zFpVG