Skip to content

Commit 9d142ed

Browse files
LorenzoBianconikuba-moo
authored andcommitted
net: veth: rely on napi_build_skb in veth_convert_skb_to_xdp_buff
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> Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com> Link: https://lore.kernel.org/r/0f822c0b72f8b71555c11745cb8fb33399d02de9.1683578488.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent af8eacf commit 9d142ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/veth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
747747
if (!page)
748748
goto drop;
749749

750-
nskb = build_skb(page_address(page), PAGE_SIZE);
750+
nskb = napi_build_skb(page_address(page), PAGE_SIZE);
751751
if (!nskb) {
752752
page_pool_put_full_page(rq->page_pool, page, true);
753753
goto drop;

0 commit comments

Comments
 (0)