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 20:31:27 +0100 [thread overview]
Message-ID: <a5a8052d-e775-4051-bcd0-d143d1970489@nvidia.com> (raw)
In-Reply-To: <42308b93-e0f3-4770-89e8-799e6d8f7901@nvidia.com>
On 02.12.26 15:48, Dragos Tatulea wrote:
> 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?
>
Answering my own question: it's a different one. Now I see the case
where the shinfo prefetch works with your WIP kernel:
┌─────────────────────────────────────┬───────┬───────┬───────┬────────────┬───────────┐
│ iperf3 servers │ base │ v2 │ noS │ v2 vs base │ noS vs v2 │
├─────────────────────────────────────┼───────┼───────┼───────┼────────────┼───────────┤
│ cpuB same L3 as cpuA │ 25.62 │ 30.88 │ 31.07 │ +20.5% │ +0.6% │
├─────────────────────────────────────┼───────┼───────┼───────┼────────────┼───────────┤
│ cpuB other L3 than cpuA (same NUMA) │ 19.48 │ 24.04 │ 19.78 │ +23.4% │ -17.7% * │
└─────────────────────────────────────┴───────┴───────┴───────┴────────────┴───────────┘
The noS (no shinfo prefetch) vs v2 (your patch) shows that a lot of perf
is lost in that specific case without the prefetch.
From my end, finally:
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Thanks for this great patch!
Thanks,
Dragos
next prev parent reply other threads:[~2026-12-02 19:31 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
2026-12-02 19:31 ` Dragos Tatulea [this message]
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=a5a8052d-e775-4051-bcd0-d143d1970489@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.