Skip to content

Commit b6e1178

Browse files
LorenzoBianconidavem330
authored andcommitted
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: ca0e014 ("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>
1 parent 769f508 commit b6e1178

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/marvell/mvneta.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2383,8 +2383,12 @@ static int mvneta_rx_swbm(struct napi_struct *napi,
23832383
mvneta_swbm_rx_frame(pp, rx_desc, rxq, &xdp_buf,
23842384
&size, page, &ps);
23852385
} else {
2386-
if (unlikely(!xdp_buf.data_hard_start))
2386+
if (unlikely(!xdp_buf.data_hard_start)) {
2387+
rx_desc->buf_phys_addr = 0;
2388+
page_pool_put_full_page(rxq->page_pool, page,
2389+
true);
23872390
continue;
2391+
}
23882392

23892393
mvneta_swbm_add_rx_fragment(pp, rx_desc, rxq, &xdp_buf,
23902394
&size, page);

0 commit comments

Comments
 (0)