summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-10-19 10:13:25 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-21 10:36:07 -0700
commitfa383f6b77a2ed788266fa8fbfb659aa284d2f58 (patch)
treec2489ef3ff2cceb3228872f4af2d3b4fb4a4cac6 /drivers
parent0db51da7a8e99f0803ec3a8e25c1a66234a219cb (diff)
net: mvneta: move header prefetch in mvneta_swbm_rx_frame
Move data buffer prefetch in mvneta_swbm_rx_frame after dma_sync_single_range_for_cpu Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 7ca3cd16d781..64f59baa2a3c 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2025,6 +2025,9 @@ mvneta_swbm_rx_frame(struct mvneta_port *pp,
rx_desc->buf_phys_addr,
len, dma_dir);
+ /* Prefetch header */
+ prefetch(data);
+
xdp->data_hard_start = data;
xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE;
xdp->data_end = xdp->data + data_len;
@@ -2122,14 +2125,10 @@ static int mvneta_rx_swbm(struct napi_struct *napi,
while (rx_proc < budget && rx_proc < rx_todo) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
u32 rx_status, index;
- unsigned char *data;
struct page *page;
index = rx_desc - rxq->descs;
page = (struct page *)rxq->buf_virt_addr[index];
- data = page_address(page);
- /* Prefetch header */
- prefetch(data);
rx_status = rx_desc->status;
rx_proc++;