[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250506145530.2877229-1-jon@nutanix.com>
Date: Tue, 6 May 2025 07:55:25 -0700
From: Jon Kohler <jon@...anix.com>
To: ast@...nel.org, daniel@...earbox.net, davem@...emloft.net, kuba@...nel.org,
hawk@...nel.org, john.fastabend@...il.com, netdev@...r.kernel.org,
bpf@...r.kernel.org, jon@...anix.com, aleksander.lobakin@...el.com
Subject: [PATCH net-next 0/4] tun: optimize SKB allocation with NAPI cache
Use the per-CPU NAPI cache for SKB allocation, leveraging bulk
allocation since the batch size is known at submission time. This
improves efficiency by reducing allocation overhead, particularly when
using IFF_NAPI and GRO, which can replenish the cache in a tight loop.
Additionally, utilize napi_build_skb and napi_consume_skb to further
benefit from the NAPI cache.
Note: This series does not address the large payload path in
tun_alloc_skb, which spans sock.c and skbuff.c. A separate series will
handle privatizing the allocation code in tun and integrating the NAPI
cache for that path.
Thanks all,
Jon
Jon Kohler (4):
tun: rcu_deference xdp_prog only once per batch
tun: optimize skb allocation in tun_xdp_one
tun: use napi_build_skb in __tun_build_skb
tun: use napi_consume_skb in tun_do_read
drivers/net/tun.c | 60 +++++++++++++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 18 deletions(-)
--
2.43.0
Powered by blists - more mailing lists