BPF List
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@mandelbit.com>
To: Dragos Tatulea <dtatulea@nvidia.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: Thu, 26 Nov 2026 01:16:49 +0100	[thread overview]
Message-ID: <b201287c-002e-421b-880e-be1da8419e37@mandelbit.com> (raw)
In-Reply-To: <20261125215233.3422038-1-dtatulea@nvidia.com>

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 stride
>> 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.
>>
> Do you have some results for this?

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


  reply	other threads:[~2026-11-26  0:17 UTC|newest]

Thread overview: 6+ 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 [this message]
2026-11-26 13:43 ` Alexandre Cassen

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=b201287c-002e-421b-880e-be1da8419e37@mandelbit.com \
    --to=antonio@mandelbit.com \
    --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