mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-08 02:07:26 +01:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.40 Removed upstreamed patches: generic/pending-6.12/680-net-fix-TCP-UDP-fraglist-GRO.patch generic/pending-6.12/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch 1- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.40&id=7c532f222361191fe228e54c5d3e0026fef8a5a0 2- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.40&id=c29a2328af96338d327cd851803338423c6f07a1 All other patches auto-refreshed. Signed-off-by: Leo Barsky <leobrsky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19514 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
25 lines
1,006 B
Diff
25 lines
1,006 B
Diff
From 804fbb3f2ec9283f7b778e057a68bfff440a0be6 Mon Sep 17 00:00:00 2001
|
|
From: Rui Salvaterra <rsalvaterra@gmail.com>
|
|
Date: Wed, 30 Mar 2022 22:51:55 +0100
|
|
Subject: [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>
|
|
---
|
|
net/netfilter/nf_conntrack_core.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/net/netfilter/nf_conntrack_core.c
|
|
+++ b/net/netfilter/nf_conntrack_core.c
|
|
@@ -2648,7 +2648,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)))
|