]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: fec: add fec_alloc_rxq_buffers_pp() to allocate buffers from page pool
authorWei Fang <wei.fang@nxp.com>
Thu, 5 Feb 2026 08:57:40 +0000 (16:57 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Feb 2026 09:58:20 +0000 (10:58 +0100)
commita2ae70c0efe4eebc6dd5b96fcfbea913403768a3
tree16990d7e0f812411c5ccd2d79b703d301fe50102
parentedd393153ef0711e75fa0d1574306c31533e1d08
net: fec: add fec_alloc_rxq_buffers_pp() to allocate buffers from page pool

Currently, the buffers of RX queue are allocated from the page pool. In
the subsequent patches to support XDP zero copy, the RX buffers will be
allocated from the UMEM. Therefore, extract fec_alloc_rxq_buffers_pp()
from fec_enet_alloc_rxq_buffers() and we will add another helper to
allocate RX buffers from UMEM for the XDP zero copy mode. In addition,
fec_alloc_rxq_buffers_pp() only initializes bdp->bufaddr and does not
initialize other fields of bdp, because these will be initialized in
fec_enet_bd_init().

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260205085742.2685134-14-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/fec_main.c