Skip to contentSkip to conversation

gve: DQO: Remove incorrect prefetch

PATCH Applied Bailey Forrest 2 participants 2 messages Jul 2, 2021

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

PATCH 1/1 gve: DQO: Remove incorrect prefetch

The prefetch is incorrectly using the dma address instead of the virtual address.

It's supposed to be:
prefetch((char *)buf_state->page_info.page_address +

	 buf_state->page_info.page_offset)

However, after correcting this mistake, there is no evidence of performance improvement.

Fixes 9b8dd5e5ea48 ("gve: DQO: Add RX path")
---
 drivers/net/ethernet/google/gve/gve_rx_dqo.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/ethernet/google/gve/gve_rx_dqo.c +0 -7
index 77bb8227f89b..8500621b2cd4 100644
@@ -566,13 +566,6 @@ static int gve_rx_dqo(struct napi_struct *napi, struct gve_rx_ring *rx,
 		return 0;
 	}
 
-	/* Prefetch the payload header. */
-	prefetch((char *)buf_state->addr + buf_state->page_info.page_offset);
-#if L1_CACHE_BYTES < 128
-	prefetch((char *)buf_state->addr + buf_state->page_info.page_offset +
-		 L1_CACHE_BYTES);
-#endif
-
 	if (eop && buf_len <= priv->rx_copybreak) {
 		rx->skb_head = gve_rx_copy(priv->dev, napi,
 					   &buf_state->page_info, buf_len, 0);
Signature · 1 line
2.32.0.93.g670b81a890-goog
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

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

Quoted 8 lines · On Thu, 1 Jul 2021 20:13:36 -0700 you wrote:

The prefetch is incorrectly using the dma address instead of the virtual address.

It's supposed to be:
prefetch((char *)buf_state->page_info.page_address +

	 buf_state->page_info.page_offset)

[...]

Here is the summary with links:
- [net] gve: DQO: Remove incorrect prefetch

    https://git.kernel.org/netdev/net/c/1bfa4d0cb5ad

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