Skip to contentSkip to conversation

stmmac: prefetch right address

PATCH Applied Matteo Croce 2 participants 2 messages Jun 9, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stmmac: prefetch right address

From: Matteo Croce <[email protected]>

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")
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -1
index 0a266fa0af7e..30b411762a9c 100644
@@ -5129,7 +5129,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));
 
Signature · 1 line
2.31.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Wed, 9 Jun 2021 19:23:03 +0200 you wrote:

From: Matteo Croce <[email protected]>

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")

[...]

Here is the summary with links:
- [net-next] stmmac: prefetch right address

    https://git.kernel.org/netdev/net-next/c/4744bf072b46

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html