🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23087

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

#23087
From: Alexandre Cassen
Date: Thu, 26 Nov 2026 13:43
48 lines
10033 bytes
Hi Antonio, Dragos,

On 11/4/26 20:52, Antonio Quartulli wrote:
 > numbers from DDIO/SDCI systems and CX-6/CX-7 would be welcome.

we are running perf tests over our 5G UPF code (pure XDP with mlx5), 
just get your patch and test it over our stuff.

use-case here is GTP-U encap, I tweaked your patch to fit tunneling 
use-case around the net_prefetch() to add 128 bytes more.

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. Mpps per port with the 16 cores busy:

                                   base      v2    v2+256B
   RQ just opened                  10.55    10.85   >11.10
   RQ after a burst                 9.96    10.82    10.95
   L1 stride prefetcher off         9.85    10.72    10.84


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%.


 > +	head_offset &= (1 << rq->mpwqe.page_shift) - 1;

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


 > +	net_prefetch(va + rq->buff.headroom);

For our tunneling use-case I just added:

+       net_prefetch(va + rq->buff.headroom + 128);


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


cheers,
Alexandre
Technical Details
Message-ID: <c3f3dd4c-5dfa-4fb0-9a64-016192be5782@corp.free.fr>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372124-linux-kernel-netdev=dewy.ru
References: <20261104195241.1883539-1-antonio@mandelbit.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372124-linux-kernel-netdev=dewy.ru
From: acassen@corp.free.fr (Alexandre Cassen)
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: Thu, 26 Nov 2026 14:43:08 +0100
Organization: Usenet Network
Message-ID: <c3f3dd4c-5dfa-4fb0-9a64-016192be5782@corp.free.fr>
References: <20261104195241.1883539-1-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="477261"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:v93Ved/DCzHcoVwoYykAA9eXXYU= sha256:wvMgKN/kjSDomXBHx21UAmSUzk2VgVjnfCX+40ZoTRg=
	sha1:RoATCNGMiMlOdRPqpblIp+0IICI= sha256:kxHJd5SvkOkBS2DweiPpzx9FCGEeJiwBbFhNPCiId9k=
Content-Language: en-US
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 A8C91125EDB; Thu, 26 Nov 2026 16:43:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=corp.free.fr
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 UTb5WgjUrctC;
	Thu, 26 Nov 2026 16:43:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372124-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=corp.free.fr
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 4257A125ED7; Thu, 26 Nov 2026 16:43:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 2FA6F3A1D4; Thu, 26 Nov 2026 13:43:22 +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=1795700601;
	b=FQQnTMdKi0nuUK0Qip5lx9Vs9IE1fCzzhLCKKaKwyRMtzGkYKB0hoTylvdR3/HWZv6AA
	 YRg4ARaoXE8NBE1MCBRFFV1O3syabJ/oBH3gTy0yQMdmiphD1jwbIPCg11dJIWi22LfMD
	 Yy/DzibsObUDaRRmLIx9aEq8DBVG0L9KNUswbPATfHNGeg7uNebomD5dagPAHS8GKdvjM
	 xc8Boz2kEXZ8IkCibJiH6nMrCJOHBNV2BrVpBdvrc0GhwGkTXD6JQWLPq0ZjOqtW+sVo6
	 qmOtGDwJjpiNCHI6QHXSzqOnXNfn0sSXgtWIqEdJSBBWl8Gu62FFWiAsxBvpgRoOjFg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795700601;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
	 Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=ko4eL4z4K6V3lb/3C7dqqajHBKs8W+KA+MAk4fHSYBk=;
	b=O0cfcxRsrkvAdFHroJsq0FeIUYgx2VgeQXNN3EYjUL9fjTsJtPbP3p1o1We6cn5kIDRt
	 DcK2m0glqzNWsGYoxKLHRIW7xGyM3EnPnKM4e5el9kq0NHGJJjQvKZ+YAhou5aZ7in7Y1
	 XuEtEEM29SAd1AAXTpkp64ieeL2fW2nQTo6pw2enL0J+BDsNj7Z/nGQop8/xf4Yk+5f26
	 UYxOccTsPp2XULwmPOYicO1IcacR63sH/sf3L+UlCWBu8uDlOOZJWcketSCIPe14kh9Ad
	 4dUZ8tKOagJDGmVSrvEQ9ZrRWz9Es0xSarnJVv7LRSqdL2EJUc/qmcoS0sUXEgFj6xg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=SH7PBekn;
	dmarc=pass header.from=corp.free.fr;
	spf=pass smtp.mailfrom=corp.free.fr;
	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 25288606A339;
	Thu, 26 Nov 2026 13:43:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=SH7PBekn
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=212.27.60.169
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795700600;
	b=Az46wLoMB9IdWX2opzw+dPXwu3uaK9HdltEDGMASPTudxcTUmvn3MJOTY7y3HIfrRNpI
	 97oEIZXP4GVAzNlFG/5bqvEO/tLOiE0A+YWhTbNjhKX6ZENhmGOR3jXd9eD/+Fyvl+OwM
	 WqbvF8tz8Z2cUIO4RhiGT0x2CaHMHsfDtfKIXwI3RIsjUuMwsen76r/9mBFIveyV1UUpL
	 mYDWDpDfm5y6Lqw+fcqY8dp2HqBFvCeJI/ylSe5cVbKY4Y5ZKiR7lkN9Af+N/WEd9Nfs7
	 e9mJb5gARKjbCPRI+Z5PuPlhr8m/4zM5bQoPpYWbv3+dCOu9PNVn3IiB9PN/tA6I5Vg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795700600;
	h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version:
	 User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=ko4eL4z4K6V3lb/3C7dqqajHBKs8W+KA+MAk4fHSYBk=;
	b=KiJU3PGBZqS22Xjh79Wn9jHGY5DvvWbsU8dc0y7viRQX4s4NpBDaPBwgNMLxdjVykqUv
	 OaiqZwdaGpabqi2igXI4xlDFuZKDDbCzQ8jcIWEdy9c3yHaz5Ene//kFHMF49I+xdAPgM
	 5o9/5vPe0ss9By3B3J/WzOAgumqG1+eBiAfdOt1DylGKssKpX4930HfGdqioSm3iqpLmq
	 xH8d9ruj7rGGxlwOg7SCTOekkvrokCZpkuHjw8cA/IN/Yr68e1mF6y/GaG0FlQlWGIuVK
	 Zihkq7RhvC2XKu8S6ikauKqLMdlvoGTYE4pnafNBoMINrbqNVdbGvVviZ43RfPv2tZA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=corp.free.fr;
	spf=pass smtp.mailfrom=corp.free.fr;
	dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=SH7PBekn;
	arc=none smtp.remote-ip=212.27.60.169
X-Received: from rcs.proxad.net (rcs.proxad.net [212.27.60.169])
	(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 0A261606A31C;
	Thu, 26 Nov 2026 13:43:18 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0A261606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=corp.free.fr
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=corp.free.fr; s=rcs;
	t=1795700590; bh=Ru+TyEI2Iupe+FdyreM1ZguqMa4aXugpSK2X1PFjJ3M=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=SH7PBeknUlBS+Ko3TQRwaap3XHmzEB/MeBQW/HN6w6bUpjw67MJLZvURDtbHYG1C1
	 WwKRadD1dZSjfkjOWwqlGzsmgkGAxIiU5aT7NyNE6mxTOwnG2VD2a13oIC38VBFs2D
	 jHY9qhDDo67hlYzC7M5Wb0LmY84iJRLMlZBQRSwtiSlQHlaIzMT7YrwPbbIt4araBL
	 8UR+H0Ag4ltugh0+YFVvhmZYbc9OzXai1ioACygfh+vXDZ+rZa6YxgFSTh0rEalBcW
	 GqEKokbJDejQ3pdF3O0RLYObZ8B6lWC2bBft8UyKgZYfqVUmC2kjDXOtYY+gj4dKaC
	 T5cXTxh9t/YZQ==
X-Received: from [0.0.0.0] (unknown [213.228.1.188])
	by rcs.proxad.net (Postfix) with ESMTPSA id 512E444C025D;
	Thu, 26 Nov 2026 14:43:09 +0100 (CET)
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-User-Agent: Mozilla Thunderbird
X-Cc: 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-In-Reply-To: <20261104195241.1883539-1-antonio@mandelbit.com>