From: Jakub Kicinski <kuba@kernel•org>
To: Dipayaan Roy <dipayanroy@linux•microsoft.com>
Cc: kys@microsoft•com, haiyangz@microsoft•com, wei.liu@kernel•org,
decui@microsoft•com, andrew+netdev@lunn•ch, davem@davemloft•net,
edumazet@google•com, pabeni@redhat•com, leon@kernel•org,
longli@microsoft•com, kotaranov@microsoft•com, horms@kernel•org,
shradhagupta@linux•microsoft.com, ssengar@linux•microsoft.com,
ernis@linux•microsoft.com, shirazsaleem@microsoft•com,
linux-hyperv@vger•kernel.org, netdev@vger•kernel.org,
linux-kernel@vger•kernel.org, linux-rdma@vger•kernel.org,
stephen@networkplumber•org, jacob.e.keller@intel•com,
leitao@debian•org, kees@kernel•org, dipayanroy@microsoft•com
Subject: Re: [PATCH net-next,v4] net: mana: Force full-page RX buffers via ethtool private flag
Date: Mon, 30 Mar 2026 15:47:55 -0700 [thread overview]
Message-ID: <20260330154755.6a8c73a6@kernel.org> (raw)
In-Reply-To: <acrkwuIFyBXhwICF@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
On Mon, 30 Mar 2026 14:01:54 -0700 Dipayaan Roy wrote:
> On some ARM64 platforms with 4K PAGE_SIZE, page_pool fragment
> allocation in the RX refill path can cause 15-20% throughput
> regression under high connection counts (>16 TCP streams).
Did you investigate what makes such a difference exactly?
As I said I suspect there are some improvements we could
make in the page pool fragmentation logic that could yield
similar wins without bothering the user.
> Add an ethtool private flag "full-page-rx" that allows the user to
> force one RX buffer per page, bypassing the page_pool fragment path.
> This restores line-rate(180+ Gbps) performance on affected platforms.
>
> Usage:
> ethtool --set-priv-flags eth0 full-page-rx on
>
> There is no behavioral change by default. The flag must be explicitly
> enabled by the user or udev rule.
>
> The existing single-buffer-per-page logic for XDP and jumbo frames is
> consolidated into a new helper mana_use_single_rxbuf_per_page().
ethtool -g rx-buf-len could also fit the bill but I guess this is more
of a hack / workaround than legit config so no strong preference.
> -static void mana_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
> +static void mana_get_strings_stats(struct mana_port_context *apc, u8 **data)
> {
> - struct mana_port_context *apc = netdev_priv(ndev);
> unsigned int num_queues = apc->num_queues;
> int i, j;
>
> - if (stringset != ETH_SS_STATS)
> - return;
> for (i = 0; i < ARRAY_SIZE(mana_eth_stats); i++)
> - ethtool_puts(&data, mana_eth_stats[i].name);
> + ethtool_puts(data, mana_eth_stats[i].name);
>
> for (i = 0; i < ARRAY_SIZE(mana_hc_stats); i++)
> - ethtool_puts(&data, mana_hc_stats[i].name);
> + ethtool_puts(data, mana_hc_stats[i].name);
>
> for (i = 0; i < ARRAY_SIZE(mana_phy_stats); i++)
> - ethtool_puts(&data, mana_phy_stats[i].name);
> + ethtool_puts(data, mana_phy_stats[i].name);
>
> for (i = 0; i < num_queues; i++) {
> - ethtool_sprintf(&data, "rx_%d_packets", i);
> - ethtool_sprintf(&data, "rx_%d_bytes", i);
> - ethtool_sprintf(&data, "rx_%d_xdp_drop", i);
> - ethtool_sprintf(&data, "rx_%d_xdp_tx", i);
> - ethtool_sprintf(&data, "rx_%d_xdp_redirect", i);
> - ethtool_sprintf(&data, "rx_%d_pkt_len0_err", i);
> + ethtool_sprintf(data, "rx_%d_packets", i);
Please factor out the noisy, no-op prep work into a separate patch for
ease of review
--
pw-bot: cr
next prev parent reply other threads:[~2026-03-30 22:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 21:01 [PATCH net-next,v4] net: mana: Force full-page RX buffers via ethtool private flag Dipayaan Roy
2026-03-30 22:47 ` Jakub Kicinski [this message]
2026-04-05 3:14 ` Dipayaan Roy
2026-04-06 17:51 ` Jakub Kicinski
2026-04-07 19:29 ` Dipayaan Roy
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=20260330154755.6a8c73a6@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=decui@microsoft$(echo .)com \
--cc=dipayanroy@linux$(echo .)microsoft.com \
--cc=dipayanroy@microsoft$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=ernis@linux$(echo .)microsoft.com \
--cc=haiyangz@microsoft$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=kees@kernel$(echo .)org \
--cc=kotaranov@microsoft$(echo .)com \
--cc=kys@microsoft$(echo .)com \
--cc=leitao@debian$(echo .)org \
--cc=leon@kernel$(echo .)org \
--cc=linux-hyperv@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=longli@microsoft$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=shirazsaleem@microsoft$(echo .)com \
--cc=shradhagupta@linux$(echo .)microsoft.com \
--cc=ssengar@linux$(echo .)microsoft.com \
--cc=stephen@networkplumber$(echo .)org \
--cc=wei.liu@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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