public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: netdev@vger.kernel.org, "Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Justin Chen" <justin.chen@broadcom.com>,
	"Vikas Gupta" <vikas.gupta@broadcom.com>,
	"Bhargava Marreddy" <bhargava.marreddy@broadcom.com>,
	"Rajashekar Hudumula" <rajashekar.hudumula@broadcom.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Eric Biggers" <ebiggers@google.com>,
	"Markus Blöchl" <markus@blochl.de>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Fernando Fernandez Mancera" <fmancera@suse.de>,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH net-next] net: bcmasp: Switch to page pool for RX path
Date: Tue, 07 Apr 2026 23:04:30 +0200	[thread overview]
Message-ID: <028ee7c4c1073056ba11c98a7faf1f13@tipi-net.de> (raw)
In-Reply-To: <20260407162658.4056141-1-florian.fainelli@broadcom.com>

On 7.4.2026 18:26, Florian Fainelli wrote:
> This shows an improvement of 1.9% in reducing the CPU cycles and data
> cache misses.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---

> [...]

> 
> -static int bcmasp_alloc_buffers(struct bcmasp_intf *intf)
> +static struct page_pool *
> +bcmasp_rx_page_pool_create(struct bcmasp_intf *intf)
> +{
> +	struct page_pool_params pp_params = {
> +		.order		= 0,
> +		/* Pages are CPU-side copy targets; no DMA mapping needed. */
> +		.flags		= 0,
> +		.pool_size	= NUM_4K_BUFFERS,
> +		.nid		= NUMA_NO_NODE,
> +		.dev		= &intf->parent->pdev->dev,
> +		.dma_dir	= DMA_FROM_DEVICE,

Nit: .dma_dir has AFAIK no effect without PP_FLAG_DMA_MAP, so
it's a bit misleading next to the "no DMA mapping needed" comment.

> +		.offset		= 0,
> +		.max_len	= PAGE_SIZE,
> +	};

Other Broadcom page pool drivers set .napi and .netdev. Adding those
here would enable direct recycling and expose pool stats in ethtool -S.

> [...]

Thanks
Nicolai

      reply	other threads:[~2026-04-07 21:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 16:26 [PATCH net-next] net: bcmasp: Switch to page pool for RX path Florian Fainelli
2026-04-07 21:04 ` Nicolai Buchwitz [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=028ee7c4c1073056ba11c98a7faf1f13@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhargava.marreddy@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=fmancera@suse.de \
    --cc=hkallweit1@gmail.com \
    --cc=justin.chen@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@blochl.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rajashekar.hudumula@broadcom.com \
    --cc=vikas.gupta@broadcom.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