[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210609172303.49529-1-mcroce@linux.microsoft.com>
Date: Wed, 9 Jun 2021 19:23:03 +0200
From: Matteo Croce <mcroce@...ux.microsoft.com>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Ong Boon Leong <boon.leong.ong@...el.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Emil Renner Berthing <kernel@...il.dk>
Subject: [PATCH net-next] stmmac: prefetch right address
From: Matteo Croce <mcroce@...rosoft.com>
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 <mcroce@...rosoft.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 0a266fa0af7e..30b411762a9c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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));
--
2.31.1
Powered by blists - more mailing lists