Skip to content

Commit 4ddf7cc

Browse files
hramamurthy12kuba-moo
authored andcommitted
gve: change to use page_pool_put_full_page when recycling pages
The driver currently uses page_pool_put_page() to recycle page pool pages. Since gve uses split pages, if the fragment being recycled is not the last fragment in the page, there is no dma sync operation. When the last fragment is recycled, dma sync is performed by page pool infra according to the value passed as dma_sync_size which right now is set to the size of fragment. But the correct thing to do is to dma sync the entire page when the last fragment is recycled. Hence change to using page_pool_put_full_page(). Link: https://lore.kernel.org/netdev/[email protected]/ Suggested-by: Yunsheng Lin <[email protected]> Reviewed-by: Praveen Kaligineedi <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: Harshitha Ramamurthy <[email protected]> Reviewed-by: Yunsheng Lin <[email protected]> Fixes: ebdfae0 ("gve: adopt page pool for DQ RDA mode") Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e110225 commit 4ddf7cc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ void gve_free_to_page_pool(struct gve_rx_ring *rx,
210210
if (!page)
211211
return;
212212

213-
page_pool_put_page(page->pp, page, buf_state->page_info.buf_size,
214-
allow_direct);
213+
page_pool_put_full_page(page->pp, page, allow_direct);
215214
buf_state->page_info.page = NULL;
216215
}
217216

0 commit comments

Comments
 (0)