From: Harshitha Ramamurthy <hramamurthy@google.com>
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/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
Suggested-by: Yunsheng Lin <redacted>
Reviewed-by: Praveen Kaligineedi <redacted>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
---
drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Yunsheng Lin <hidden> Date: 2024-10-24 02:36:05
On 2024/10/24 6:11, Praveen Kaligineedi wrote:
From: Harshitha Ramamurthy <hramamurthy@google.com>
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().
I am not sure if Fixes tag is needed if the blamed commit is only
in the net-next tree. Otherwise, LGTM.
Reviewed-by: Yunsheng Lin <redacted>
From: Simon Horman <horms@kernel.org> Date: 2024-10-24 15:45:08
On Thu, Oct 24, 2024 at 10:36:02AM +0800, Yunsheng Lin wrote:
On 2024/10/24 6:11, Praveen Kaligineedi wrote:
quoted
From: Harshitha Ramamurthy <hramamurthy@google.com>
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().
I am not sure if Fixes tag is needed if the blamed commit is only
in the net-next tree. Otherwise, LGTM.
I think it would be best to provide a fixes tag in this case.
It can be done by supplying it in a response to this email thread.
(I think it needs to start at the beginning of a line.)
On Thu, Oct 24, 2024 at 8:45 AM Simon Horman [off-list ref] wrote:
On Thu, Oct 24, 2024 at 10:36:02AM +0800, Yunsheng Lin wrote:
quoted
On 2024/10/24 6:11, Praveen Kaligineedi wrote:
quoted
From: Harshitha Ramamurthy <hramamurthy@google.com>
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().
I am not sure if Fixes tag is needed if the blamed commit is only
in the net-next tree. Otherwise, LGTM.
I think it would be best to provide a fixes tag in this case.
It can be done by supplying it in a response to this email thread.
(I think it needs to start at the beginning of a line.)
Thanks Yunsheng and Simon. I wasn't sure since this patch was targeted
for net-next. I have provided a Fixes tag below.
From: Simon Horman <horms@kernel.org> Date: 2024-10-25 09:09:18
On Thu, Oct 24, 2024 at 10:58:47AM -0700, Harshitha Ramamurthy wrote:
On Thu, Oct 24, 2024 at 8:45 AM Simon Horman [off-list ref] wrote:
quoted
On Thu, Oct 24, 2024 at 10:36:02AM +0800, Yunsheng Lin wrote:
quoted
On 2024/10/24 6:11, Praveen Kaligineedi wrote:
quoted
From: Harshitha Ramamurthy <hramamurthy@google.com>
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().
I am not sure if Fixes tag is needed if the blamed commit is only
in the net-next tree. Otherwise, LGTM.
I think it would be best to provide a fixes tag in this case.
It can be done by supplying it in a response to this email thread.
(I think it needs to start at the beginning of a line.)
Thanks Yunsheng and Simon. I wasn't sure since this patch was targeted
for net-next. I have provided a Fixes tag below.
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski [off-list ref]:
On Wed, 23 Oct 2024 15:11:41 -0700 you wrote:
From: Harshitha Ramamurthy <hramamurthy@google.com>
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.
[...]