Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path
From: Alexandre Cassen
Date: Thu Nov 26 2026 - 08:43:28 EST
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