🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25328

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

#25328
From: Antonio Quartulli
Date: Tue, 01 Dec 2026 14:11
81 lines
12669 bytes
Hi Dragos,

On 01/12/2026 12:20, Dragos Tatulea wrote:
> 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.

Thanks a lot for trying ovpn out :-)
I re-measured today and found why: my numbers were taken with the ovpn
code we are working on, not with the ovpn in net-next, and the two
behave very differently herei (we are testing GRO/GSO and other
techniques to squeeze every single Bps out of it!).

Same setup as before (Ryzen 9 9950X, ConnectX-5, MTU 1500, stock ring
and coalescing, one RX queue with its IRQ on a dedicated CPU, AES-GCM,
mean of 3 rounds), Gb/s:

                                   off     v2   v2 w/o shinfo
  net-next ovpn, 1 tunnel         17.8   17.9      17.9
  net-next ovpn, 3 tunnels        18.0   20.5      19.7
  ovpn perf branch, 1 tunnel      33.0   44.9      37.5
  ovpn perf branch, 3 tunnels     30.8   41.3      38.1

("3 tunnels" is your layout: 3 tunnels over a single queue, one TCP
stream each.)

With the net-next ovpn the sender is the bottleneck: without GSO, every
packet is encrypted in the sending application's context, which caps a
tunnel at about 18 Gb/s. The receiver gets cheaper with v2, but that
doesn't show as throughput. That's the small difference you saw.

Our perf branch adds UDP GSO/GRO batching to ovpn (Ralf Lici's series on
openvpn-devel) and other RX/TX work, which makes the receiving CPU the
bottleneck. There v2 gives +34-36%, also with your layout. The
skb_shared_info line is worth +20% of that with one tunnel and +8% with
three; my earlier "+4-5% without it" came from an older version of our
GRO code and is outdated.

If you want to try it: the branch is antonio/ovpn-perf-next at
https://github.com/mandelbitdev/ovpn-net-next (4a8182fa1798). It needs
its own kernel (it changes UDP GRO too); the tunnels can be set up with
the ovpn-cli of its selftests.

The quickest way to see the throughput effect without ovpn is plain TCP
with several flows on one RX queue, the application on another CPU:

  receiver:  ethtool -L <if> combined 1
             echo <cpuA> > /proc/irq/<mlx5_comp0 IRQ>/smp_affinity_list
             taskset -c <cpuB> iperf3 -s
  sender:    iperf3 -c <receiver> -P 4 -t 20

That gives here, mean of 3 rounds:

                                   off     v2
  TCP, 4 streams, Gb/s            56.1   89.8   +60%
  RX CPU cycles/packet            1172    664   -43%
  TCP, 1 stream, Gb/s             50.4   49.5
  RX CPU cycles/packet            1176    663   -44%

With 4 streams and no prefetch the RX CPU is saturated and drops (about
10 million TCP retransmits per 20 s run, 130 thousand with v2). A single
stream stays at about 50 Gb/s either way, so there the gain shows only
as RX CPU time.

I can share the scripts I used for both if they help.

Ah, one last note: for convenience I run my tests on a single host, with
the two ports of the CX5 connected to each other and two netns that set
them apart (but as long as you have enough cores, this shouldn't make a
difference for us).

Cheers,

--
Antonio Quartulli

Mandelbit Srl
https://www.mandelbit.com
Technical Details
Message-ID: <20261201141133.1747734-1-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375150-linux-kernel-netdev=dewy.ru
References: <20261104195241.1883539-1-antonio@mandelbit.com> <a31e1e60-7e31-4a14-a087-428d1e3627f2@nvidia.com> <674eb8ef-c93f-4926-a760-62df154ed3eb@mandelbit.com> <20261125215233.3422038-1-dtatulea@nvidia.com> <b201287c-002e-421b-880e-be1da8419e37@mandelbit.com> <20261201112031.2657332-1-dtatulea@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375150-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:11:31 +0100
Organization: Usenet Network
Message-ID: <20261201141133.1747734-1-antonio@mandelbit.com>
References: <20261104195241.1883539-1-antonio@mandelbit.com> <a31e1e60-7e31-4a14-a087-428d1e3627f2@nvidia.com> <674eb8ef-c93f-4926-a760-62df154ed3eb@mandelbit.com> <20261125215233.3422038-1-dtatulea@nvidia.com> <b201287c-002e-421b-880e-be1da8419e37@mandelbit.com> <20261201112031.2657332-1-dtatulea@nvidia.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1731984"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:cjBPwq0xan2cvf7+gFZTsjZjx04= sha256:4sMufgefPvXlkF8Y66nIwFGy41DqNjjczoVkwASUAgI=
	sha1:xDnNMkOzgo7FWGpwdw7cEEHr5Ac= sha256:yrw4SQwcqGRkas4HBhF5wNByHgvo5jGqvv2pXuGMaxo=
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 577F41173DC; Tue,  1 Dec 2026 17:12:23 +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 cw4zEHXN2Sef;
	Tue,  1 Dec 2026 17:12:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375150-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 6B9E91173DB; Tue,  1 Dec 2026 17:12:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 5A5CC283C0; Tue,  1 Dec 2026 14:12:02 +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=1796134316;
	b=iOZs8F5VlsmjJdWcfIO/9lSrFS5h2G5gO0Zd+LdUAklxMfKoZBFmZFgwICqqotSLE6UI
	 rEIF2L2Aak1r6FjIA/YeGRevnC3k0YOEUvOw2gT8Xl1ufurIBFHSCTS4sxakiyUVBR2Yb
	 646DdT9fmYxL1xfeAprh5wHNXZo1x9qbwn+BBRLpCcCiaXT2DDZxM2D6IYIn2PyqWZM/s
	 vpSzm8yMRSZ8snilA8ucKh7hwkPWHIIZyjlTIHC6ciY88bqnrpMsMMeGbDjiBllZHR9+U
	 4S7nV0zAdrzWgNDaQulWIrZ4YjIrLjgwnZesbpjEAZnrl2Ansk5mnzWry8ujfYIGTyw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796134316;
	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=brN6pWJbFGk3v0+ipTn+APpw/DdPmoBg2OJaY1t3e00=;
	b=HyiDhF3j8OvgXGBTPTA/ZHHvr7yiW6GC83zLjYR2v8DMJL29PDnp77++5x+6zRISf9cV
	 FMCPtNdkFMLmsJ59zWUyQ7+jNIQUnETAFeB7lhT4mjZWnq5Q/xLGhvLiSMP4n/RW5lCbi
	 CEwiXQ/5+Y1Lm+/u4gQ0vD4OzEpnXSXO7IqS4oo4FHnUdoF9DDVL7GflVKpeZcQrSmUt0
	 Z18O2eMlglSVZ68QJcKwO/EqWCAtH5Jktd50tm+g2NHv1kMSnTYT+C3wKsjkaf4HmuCtv
	 g/oP7+VV0QKUg9v7ICYZvqU0/5ETOQYE5VU844LcbwYKbaxwKx4kpY5ounYcYL6l72g==
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="z/AJLfiI";
	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 C03B9606A322;
	Tue,  1 Dec 2026 14:11:56 +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=z/AJLfiI
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796134310;
	b=eyxKiJ/0wjUi0x024dYc/OGjjgX6FZ6oQ/hOZgFre6Q5ATXM+h7sZlYpR9lGhAgum97k
	 zVhKGAbX0IlMtSYMyveVj9rjSHJwXU7NRvOO+Pp+4Xi9U/MS+PQZ8/f5R6P4PdeTwzTMG
	 qc5Z1YwePSfpWXapuvGgxXxCsfCgDozp6jZjCfH4tyxn38b2VpfEngmm6h8S7VJUEgmxc
	 CDnPtREucQUeSfnFJhvxR5JvCFUSDeoLFG6kBMibMg9sbQaEKOS+mMNXQAoZtIWulvRsC
	 PFiHHpdGdMPQq4VQ1WrfH5vVlSFlHu188yB9ipm6XX/lJ1xS4/d/CxQbBZcHnbVEugQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796134310;
	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=brN6pWJbFGk3v0+ipTn+APpw/DdPmoBg2OJaY1t3e00=;
	b=LOW6JVY7A1vmxuwXW/RrbKQEo0olUxKBFjBHbzaK9aHaK4GqdVAuArHMMDNVurritkTo
	 stYDWupaQyvYYE4YlUoPqWNUmPimXiFMIlESjoj4qRXKyiZtMHgPpR8N/HylwfwLoNS4V
	 Xfd+sO75aFPdF868yY0F2/sfPj0A14wnk2CewkhIRITyMxC/eSlAwMmESA8T+6yIZHKRw
	 4JhoLI6xajt95zADFON5+DoZV/N02nNqYIlkANSVnsdVdx9Klia7yIudNuuK5GHu1QLW2
	 1fJvc6uvQRqV4PqXFEiVG/EEaN4OEfi6//F56c00gdpTtMXi+YZprHkAl/PlN/Uqx0g==
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="z/AJLfiI";
	arc=none smtp.remote-ip=195.10.208.51
X-Received: from mout-b-206.mailbox.org (mout-b-206.mailbox.org [195.10.208.51])
	(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 AD885606A339;
	Tue,  1 Dec 2026 14:11:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AD885606A339
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 smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202])
	(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-206.mailbox.org (Postfix) with ESMTPS id 4jf2rK2xVhzZy;
	Tue, 01 Dec 2026 15:11:45 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
	s=MBO0001; t=1796134305;
	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=brN6pWJbFGk3v0+ipTn+APpw/DdPmoBg2OJaY1t3e00=;
	b=z/AJLfiIfNLkYbSJCTo6rqaYJ7Ujvihsh4V8NMYHjrPfpEp1701sInwJgelKNXibZ6VSCe
	Pf2kT8m7Uq4hILlW1LwzLjVKlfwJU5EMUjSpSFcZ1bGu8QpOi/x4ut/2M+tXocP2lDaHBv
	ksFioWCBocaOH2LGwaQgNyaFIxyRnq1B68kLH4PxWOi0aDjRCdNz11BJq5s/YweXW0Wscp
	dghTVWC15sLvJjFMV/8L4dZf/n+XxsorucpLZ7OjdZ28eh0U57nqvv4Pz5G0x2XIz3HOOR
	BncBCWunSB4UXkWcGUdrrevwERrZ/Zr9pQ2fsptYlKarzlA3U/3oNm+muyPP9Q==
X-Authentication-Results: outgoing_mbo_mout;
	dkim=none;
	spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::202 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,
	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: <20261201112031.2657332-1-dtatulea@nvidia.com>
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: 4jf2rK2xVhzZy