summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2023-05-08 22:45:23 +0200
committerJakub Kicinski <kuba@kernel.org>2023-05-09 20:10:36 -0700
commit9d142ed484a3d517e779fc3c16028a720762643f (patch)
tree927012903124b2581d8bcff92e6f4b76f908da6f /drivers
parentaf8eacf2b42e0a736a7a2a1379fb6c0b7fd66da4 (diff)
downloadlinux-9d142ed484a3d517e779fc3c16028a720762643f.tar.gz
linux-9d142ed484a3d517e779fc3c16028a720762643f.tar.bz2
linux-9d142ed484a3d517e779fc3c16028a720762643f.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/veth.c2
1 files changed, 1 insertions, 1 deletions
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;