summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2020-09-18 23:25:56 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-20 23:12:24 +0200
commitb6e11785cf957f4f4dd7da7f5a1f41ca4f1ea913 (patch)
treef9fb759d0ab03ca4fc46a199ccf5bb9e041fff35 /drivers
parentrhashtable: fix indentation of a continue statement (diff)
downloadlinux-b6e11785cf957f4f4dd7da7f5a1f41ca4f1ea913.tar.xz
linux-b6e11785cf957f4f4dd7da7f5a1f41ca4f1ea913.zip
net: mvneta: recycle the page in case of out-of-order
Recycle the received page into the page_pool cache if the dma descriptors arrived in a wrong order Fixes: ca0e014609f05 ("net: mvneta: move skb build after descriptors processing") 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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 69a900081165..c4345e3d616f 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2383,8 +2383,12 @@ static int mvneta_rx_swbm(struct napi_struct *napi,
mvneta_swbm_rx_frame(pp, rx_desc, rxq, &xdp_buf,
&size, page, &ps);
} else {
- if (unlikely(!xdp_buf.data_hard_start))
+ if (unlikely(!xdp_buf.data_hard_start)) {
+ rx_desc->buf_phys_addr = 0;
+ page_pool_put_full_page(rxq->page_pool, page,
+ true);
continue;
+ }
mvneta_swbm_add_rx_fragment(pp, rx_desc, rxq, &xdp_buf,
&size, page);