mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 17:31:27 +00:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From b69ce4bbf59026c2d3d8bf840f6bc670e85fa81f Mon Sep 17 00:00:00 2001
|
|
From: Rui Salvaterra <rsalvaterra@gmail.com>
|
|
Date: Thu, 16 Mar 2023 19:54:17 +0530
|
|
Subject: [PATCH 121/281] OpenWrt:
|
|
661-kernel-ct-size-the-hashtable-more-adequately.patch
|
|
|
|
kernel: ct: size the hashtable more adequately
|
|
|
|
To set the default size of the connection tracking hash table, a divider of
|
|
16384 becomes inadequate for a router handling lots of connections. Divide by
|
|
2048 instead, making the default size scale better with the available RAM.
|
|
|
|
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
|
|
|
|
Change-Id: Icb9149829c38e64083a69a95c1c8091d7e094bac
|
|
Signed-off-by: Ram Chandra Jangir <quic_rjangir@quicinc.com>
|
|
---
|
|
net/netfilter/nf_conntrack_core.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
|
|
index 7f0f3bcaae03..90b6ee853396 100644
|
|
--- a/net/netfilter/nf_conntrack_core.c
|
|
+++ b/net/netfilter/nf_conntrack_core.c
|
|
@@ -2703,7 +2703,7 @@ int nf_conntrack_init_start(void)
|
|
|
|
if (!nf_conntrack_htable_size) {
|
|
nf_conntrack_htable_size
|
|
- = (((nr_pages << PAGE_SHIFT) / 16384)
|
|
+ = (((nr_pages << PAGE_SHIFT) / 2048)
|
|
/ sizeof(struct hlist_head));
|
|
if (BITS_PER_LONG >= 64 &&
|
|
nr_pages > (4 * (1024 * 1024 * 1024 / PAGE_SIZE)))
|
|
--
|
|
2.17.1
|
|
|