Netdev List
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@mandelbit.com>
To: Alexandre Cassen <acassen@corp.free.fr>
Cc: Antonio Quartulli <antonio@mandelbit.com>,
	netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com,
	mbloch@nvidia.com, leon@kernel.org, dtatulea@nvidia.com,
	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: Tue,  1 Dec 2026 15:29:02 +0100	[thread overview]
Message-ID: <20261201142903.1791860-1-antonio@mandelbit.com> (raw)
In-Reply-To: <c3f3dd4c-5dfa-4fb0-9a64-016192be5782@corp.free.fr>

Hi Alexandre,

On 26/11/2026 14:43, Alexandre Cassen wrote:
> 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.

Thanks a lot for testing this on a DDIO system with CX-7!
This is exactly the data I was missing :-)

> 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%.

Interesting...That fits the idea behind the patch: once the pages of a
WQE are no longer adjacent, only the explicit look-ahead can still find
the next packet.

> cosmetics: BIT(rq->mpwqe.page_shift) - 1

Agreed, I'll switch to BIT() if a v3 is needed..

> For our tunneling use-case I just added:
>
> +       net_prefetch(va + rq->buff.headroom + 128);

Makes sense for GTP-U, where the inner headers you parse start beyond
the first two lines.
This said, I'd keep the driver at the outer headers, though: for
untunnelled traffic the extra line is never touched, and the right
amount depends on the encapsulation.

> I will run production with your patch with the +128 for our stuff...
> thanks for that !

Thank you! Please let us know how it behaves! :-)


Cheers,

--
Antonio Quartulli

Mandelbit Srl
https://www.mandelbit.com

      reply	other threads:[~2026-12-01 14:29 UTC|newest]

Thread overview: 9+ 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-11-26 13:43 ` Alexandre Cassen
2026-12-01 14:29   ` Antonio Quartulli [this message]

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=20261201142903.1791860-1-antonio@mandelbit.com \
    --to=antonio@mandelbit.com \
    --cc=acassen@corp.free.fr \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cratiu@nvidia.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --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