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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 May 2023 09:01:43 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>, <netdev@...r.kernel.org>
CC: <lorenzo.bianconi@...hat.com>, <bpf@...r.kernel.org>,
	<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <hawk@...nel.org>, <john.fastabend@...il.com>,
	<ast@...nel.org>, <daniel@...earbox.net>
Subject: Re: [PATCH net-next] net: veth: rely on napi_build_skb in
 veth_convert_skb_to_xdp_buff

On 2023/5/9 4:45, Lorenzo Bianconi wrote:
> Since veth_convert_skb_to_xdp_buff routine runs in veth_poll() NAPI,
> rely on napi_build_skb() instead of build_skb() to reduce skb allocation
> cost.

LGTM.
Reviewed-by: Yunsheng Lin <linyunsheng@...wei.com>

> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
>  drivers/net/veth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index dce9f9d63e04..3ae496011640 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -747,7 +747,7 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
>  		if (!page)
>  			goto drop;
>  
> -		nskb = build_skb(page_address(page), PAGE_SIZE);
> +		nskb = napi_build_skb(page_address(page), PAGE_SIZE);
>  		if (!nskb) {
>  			page_pool_put_full_page(rq->page_pool, page, true);
>  			goto drop;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ