From: Dragos Tatulea <dtatulea@nvidia.com>
To: Antonio Quartulli <antonio@mandelbit.com>
Cc: 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
Subject: Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path
Date: Wed, 2 Dec 2026 15:48:22 +0100 [thread overview]
Message-ID: <42308b93-e0f3-4770-89e8-799e6d8f7901@nvidia.com> (raw)
In-Reply-To: <20261201141133.1747734-1-antonio@mandelbit.com>
Hi Antonio,
On 01.12.26 15:11, Antonio Quartulli wrote:
> 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
>
Is cpuB on same L3 cache domain with cpuB?
> 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.
>
Yes, this would be useful. I took your kernel and still can't see the
added benefit.
> 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).
>
That's also how I am testing it.
Thanks,
Dragos
next prev parent reply other threads:[~2026-12-02 14:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 19:52 [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path Antonio Quartulli
2026-11-06 10:55 ` Dragos Tatulea
2026-11-10 10:40 ` Antonio Quartulli
2026-11-25 21:52 ` Dragos Tatulea
2026-11-26 0:16 ` Antonio Quartulli
2026-12-01 11:20 ` Dragos Tatulea
2026-12-01 14:11 ` Antonio Quartulli
2026-12-02 14:48 ` Dragos Tatulea [this message]
2026-12-02 19:31 ` Dragos Tatulea
2026-12-02 19:56 ` Antonio Quartulli
2026-11-26 13:43 ` Alexandre Cassen
2026-12-01 14:29 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42308b93-e0f3-4770-89e8-799e6d8f7901@nvidia.com \
--to=dtatulea@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=antonio@mandelbit.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cratiu@nvidia.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox