* [PATCH net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff
@ 2023-05-08 20:45 Lorenzo Bianconi
2023-05-09 1:01 ` Yunsheng Lin
2023-05-10 5:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2023-05-08 20:45 UTC (permalink / raw)
To: netdev
Cc: lorenzo.bianconi, bpf, davem, edumazet, kuba, pabeni, hawk,
john.fastabend, linyunsheng, ast, daniel
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.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.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;
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff
2023-05-08 20:45 [PATCH net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff Lorenzo Bianconi
@ 2023-05-09 1:01 ` Yunsheng Lin
2023-05-10 5:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Yunsheng Lin @ 2023-05-09 1:01 UTC (permalink / raw)
To: Lorenzo Bianconi, netdev
Cc: lorenzo.bianconi, bpf, davem, edumazet, kuba, pabeni, hawk,
john.fastabend, ast, daniel
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@huawei.com>
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff
2023-05-08 20:45 [PATCH net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff Lorenzo Bianconi
2023-05-09 1:01 ` Yunsheng Lin
@ 2023-05-10 5:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-10 5:20 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: netdev, lorenzo.bianconi, bpf, davem, edumazet, kuba, pabeni,
hawk, john.fastabend, linyunsheng, ast, daniel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 8 May 2023 22:45:23 +0200 you 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.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/veth.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff
https://git.kernel.org/netdev/net-next/c/9d142ed484a3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-10 5:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 20:45 [PATCH net-next] net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff Lorenzo Bianconi
2023-05-09 1:01 ` Yunsheng Lin
2023-05-10 5:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox