From: Matteo Croce Date: Wed, 9 Jun 2021 17:23:03 +0000 (+0200) Subject: stmmac: prefetch right address X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4744bf072b4640c5e2ea65c2361ad6c832f28fa8;p=linux.git stmmac: prefetch right address To support XDP, a headroom is prepended to the packet data. Consider this offset when doing a prefetch. Fixes: da5ec7f22a0f ("net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1f817b1b890cf..180f347b4c8ee 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5131,7 +5131,7 @@ read_again: /* Buffer is good. Go on. */ - prefetch(page_address(buf->page)); + prefetch(page_address(buf->page) + buf->page_offset); if (buf->sec_page) prefetch(page_address(buf->sec_page));