summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Xing <kernelxing@tencent.com>2025-11-18 15:06:44 +0800
committerJakub Kicinski <kuba@kernel.org>2025-11-19 20:29:24 -0800
commit01d7385618992a9017198534870aec62f54f963a (patch)
tree0f03cbb08a3c60384eef015c4aee25a59e3d9fde
parent3505730d9042a8d26e89288ecab04e5d32794e4a (diff)
net: increase default NAPI_SKB_CACHE_BULK to 32
The previous value 16 is a bit conservative, so adjust it along with NAPI_SKB_CACHE_SIZE, which can minimize triggering memory allocation in napi_skb_cache_get*(). Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20251118070646.61344-3-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--net/core/skbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index e4abf0e56776..b6fe7ab85c4a 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -224,7 +224,7 @@ static void skb_under_panic(struct sk_buff *skb, unsigned int sz, void *addr)
}
#define NAPI_SKB_CACHE_SIZE 128
-#define NAPI_SKB_CACHE_BULK 16
+#define NAPI_SKB_CACHE_BULK 32
#define NAPI_SKB_CACHE_HALF (NAPI_SKB_CACHE_SIZE / 2)
struct napi_alloc_cache {