]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: bcmgenet: convert RX path to page_pool
authorNicolai Buchwitz <nb@tipi-net.de>
Wed, 10 Jun 2026 11:48:35 +0000 (13:48 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 11 Jun 2026 22:44:10 +0000 (15:44 -0700)
commit7bc054c2d4ed1fa3560144fea41d91a87eaa25f1
tree01cffe583495914435c2c9d726886fdcf597e1fe
parentaeb62be4d3b18b76551bf7806e30d72e5c3bbade
net: bcmgenet: convert RX path to page_pool

Replace the per-packet __netdev_alloc_skb() + dma_map_single() in the
RX path with page_pool. SKBs are built from pool pages via
napi_build_skb() with skb_mark_for_recycle() so the network stack
returns pages to the pool, and DMA mapping happens once per page
instead of once per packet.

Reject HW-reported lengths smaller than the RSB so a runt cannot
underflow the SKB build path.

Drop the now-unused priv->rx_buf_len field and the rx_dma_failed soft
MIB counter (nothing increments it after the conversion). This
removes the "rx_dma_failed" entry from ethtool -S, which is a
user-visible change for monitoring tools that key on stat names.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
Tested-by: Justin Chen <justin.chen@broadcom.com>
Link: https://patch.msgid.link/20260610114835.2225423-1-nb@tipi-net.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/Kconfig
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h