RE: [PATCH net-next 4/5] net: fec: remove rx_align from fec_enet_private
From: Wei Fang
Date: Wed Nov 12 2025 - 20:40:18 EST
> On Tue, Nov 11, 2025 at 06:00:56PM +0800, Wei Fang wrote:
> > The rx_align was introduced by the commit 41ef84ce4c72 ("net: fec:
> > change FEC alignment according to i.mx6 sx requirement"). Because the
> > i.MX6 SX requires RX buffer must be 64 bytes alignment.
> >
> > Since the commit 95698ff6177b ("net: fec: using page pool to manage RX
> > buffers"), the address of the RX buffer is always the page address
> > plus
> > 128 bytes, so RX buffer is always 64-byte aligned.
>
> It is not obvious to me where this 128 bytes is added.
>
Sorry, I misremembered the value of XDP_PACKET_HEADROOM. it should
be 256 bytes.
See fec_enet_alloc_rxq_buffers():
phys_addr = page_pool_get_dma_addr(page) + FEC_ENET_XDP_HEADROOM;
bdp->cbd_bufaddr = cpu_to_fec32(phys_addr);
I will correct it in v2, thanks