Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path
From: Antonio Quartulli
Date: Wed Nov 25 2026 - 19:17:13 EST
Hi Dragos,
On 25/11/2026 22:52, Dragos Tatulea wrote:
Overall I think these results are quite good. I was expecting to
see some issues at scale but nothing really stands out to be
honest.
Well, thank you for running all of this on hardware I can't get my hands
on!
I wondered how much each prefetch bings and gathered some data
about that as well on the AMD system:
v2 without without without
page headers shinfo
UDP 64B flood +7% +7% +3% +7%
UDP 512B flood +8% +8% 0% +8%
TCP 1 stream +18% +17% 0% +18%
XDP_DROP read +81% +81% -2% +82%
XDP_DROP no-touch -6% -6% -4% -5%
XDP_TX +106% +106% -1% +108%
It does look like the big bulk of the advantage comes from
the header fetch.
Agreed, for these tests.
The skb_shared_info prefetch pays off when the stack keeps each packet
in its own skb: with TCP through an ovpn UDP tunnel on my setup it
carries most of the gain (+34% with it, +4-5% without), while plain TCP
and pktgen were within 2% either way, which matches what you see.
I'm also testing a small follow-up: v2 doesn't prefetch when the strideDo you have some results for this?
4 ahead is in the next WQE, so the first strides of every WQE are never
prefetched. Following the WQ list to the next WQE (only when
cur_sz >= 2, so it is posted and its pages are allocated) removes 26-32%
of the remaining DRAM demand fills on the RX CPU and adds 1.8-3.3%
throughput, measured with TCP inside an ovpn UDP tunnel (where the RX
CPU is the bottleneck); its latency is the "+next" column above.
I had planned to send it as a follow-up patch, but I can also fold it in
a v3, whatever you prefer once you have your results.
Well... after running more extensive tests I came to the conclusion that my follow-up is not bringing any gain, despite what I anticipated.
Therefore I'd just keep v2 as is.
Thanks!
Regards,
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com