lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf13ffde-2a5f-4845-a27d-d4789a384891@huawei.com>
Date: Thu, 24 Oct 2024 10:36:02 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Praveen Kaligineedi <pkaligineedi@...gle.com>, <netdev@...r.kernel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <andrew+netdev@...n.ch>, <willemb@...gle.com>,
	<jeroendb@...gle.com>, <shailend@...gle.com>, <hramamurthy@...gle.com>,
	<ziweixiao@...gle.com>, <jacob.e.keller@...el.com>
Subject: Re: [PATCH net-next] gve: change to use page_pool_put_full_page when
 recycling pages

On 2024/10/24 6:11, Praveen Kaligineedi wrote:
> From: Harshitha Ramamurthy <hramamurthy@...gle.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 <linyunsheng@...wei.com>

> 
> Link: https://lore.kernel.org/netdev/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
> 
> Suggested-by: Yunsheng Lin <linyunsheng@...wei.com>
> Reviewed-by: Praveen Kaligineedi <pkaligineedi@...gle.com>
> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
> Signed-off-by: Harshitha Ramamurthy <hramamurthy@...gle.com>
> ---
>  drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c b/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
> index 05bf1f80a79c..403f0f335ba6 100644
> --- a/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
> +++ b/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
> @@ -210,8 +210,7 @@ void gve_free_to_page_pool(struct gve_rx_ring *rx,
>  	if (!page)
>  		return;
>  
> -	page_pool_put_page(page->pp, page, buf_state->page_info.buf_size,
> -			   allow_direct);
> +	page_pool_put_full_page(page->pp, page, allow_direct);
>  	buf_state->page_info.page = NULL;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ