Skip to content

Commit

Permalink
stmmac: prefetch right address
Browse files Browse the repository at this point in the history
To support XDP, a headroom is prepended to the packet data.
Consider this offset when doing a prefetch.

Fixes: da5ec7f ("net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
teknoraver authored and davem330 committed Jun 9, 2021
1 parent f3b5a89 commit 4744bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5131,7 +5131,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)

/* 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));

Expand Down

0 comments on commit 4744bf0

Please sign in to comment.