RE: [PATCH net-next 4/5] net: fec: remove rx_align from fec_enet_private

From: Wei Fang

Date: Thu Nov 13 2025 - 21:17:44 EST


> > 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
>
> So you could add a BUILD_BUG_ON() test which makes sure
> FEC_ENET_XDP_HEADROOM gives you the needed alignment. That way it is
> both "documented" and enforced. And it costs nothing at runtime.
>

Yes, I will add such a check, thanks