* [PATCH] netfilter: conntrack: fix nf_conntrack_expect_max default value in documentation
@ 2026-08-20 12:57 Shaojie Sun
2026-09-16 18:22 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Shaojie Sun @ 2026-08-20 12:57 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Florian Westphal, Phil Sutter, netfilter-devel, coreteam,
Jonathan Corbet, Shaojie Sun
The documentation for nf_conntrack_expect_max incorrectly states that the
default value is nf_conntrack_buckets / 256. However, the code in
nf_conntrack_expect_init() shows:
nf_ct_expect_hsize = nf_conntrack_htable_size / 256;
nf_ct_expect_max = nf_ct_expect_hsize * 4;
This means the default value is actually nf_conntrack_buckets / 64
(i.e. 4 times the hash table size, which defaults to
nf_conntrack_buckets / 256).
Fix the documentation to reflect the correct default value and add
explanation of the calculation.
Signed-off-by: Shaojie Sun <sunshaojie@kylinos.cn>
---
Documentation/networking/nf_conntrack-sysctl.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/networking/nf_conntrack-sysctl.rst b/Documentation/networking/nf_conntrack-sysctl.rst
index 35f889259fcd..77521253fe22 100644
--- a/Documentation/networking/nf_conntrack-sysctl.rst
+++ b/Documentation/networking/nf_conntrack-sysctl.rst
@@ -44,7 +44,8 @@ nf_conntrack_events - BOOLEAN
nf_conntrack_expect_max - INTEGER
Maximum size of expectation table. Default value is
- nf_conntrack_buckets / 256. Minimum is 1.
+ nf_conntrack_buckets / 64 (i.e. 4 times the hash table size,
+ which defaults to nf_conntrack_buckets / 256). Minimum is 1.
nf_conntrack_frag6_high_thresh - INTEGER
default 262144
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netfilter: conntrack: fix nf_conntrack_expect_max default value in documentation
2026-08-20 12:57 [PATCH] netfilter: conntrack: fix nf_conntrack_expect_max default value in documentation Shaojie Sun
@ 2026-09-16 18:22 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2026-09-16 18:22 UTC (permalink / raw)
To: Shaojie Sun
Cc: Florian Westphal, Phil Sutter, netfilter-devel, coreteam,
Jonathan Corbet
On Thu, Aug 20, 2026 at 08:57:18PM +0800, Shaojie Sun wrote:
> The documentation for nf_conntrack_expect_max incorrectly states that the
> default value is nf_conntrack_buckets / 256. However, the code in
> nf_conntrack_expect_init() shows:
>
> nf_ct_expect_hsize = nf_conntrack_htable_size / 256;
> nf_ct_expect_max = nf_ct_expect_hsize * 4;
>
> This means the default value is actually nf_conntrack_buckets / 64
> (i.e. 4 times the hash table size, which defaults to
> nf_conntrack_buckets / 256).
>
> Fix the documentation to reflect the correct default value and add
> explanation of the calculation.
>
> Signed-off-by: Shaojie Sun <sunshaojie@kylinos.cn>
> ---
> Documentation/networking/nf_conntrack-sysctl.rst | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/networking/nf_conntrack-sysctl.rst b/Documentation/networking/nf_conntrack-sysctl.rst
> index 35f889259fcd..77521253fe22 100644
> --- a/Documentation/networking/nf_conntrack-sysctl.rst
> +++ b/Documentation/networking/nf_conntrack-sysctl.rst
> @@ -44,7 +44,8 @@ nf_conntrack_events - BOOLEAN
>
> nf_conntrack_expect_max - INTEGER
> Maximum size of expectation table. Default value is
> - nf_conntrack_buckets / 256. Minimum is 1.
> + nf_conntrack_buckets / 64 (i.e. 4 times the hash table size,
> + which defaults to nf_conntrack_buckets / 256). Minimum is 1.
I'd suggest to remove the parens explaination here.
>
> nf_conntrack_frag6_high_thresh - INTEGER
> default 262144
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-16 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 12:57 [PATCH] netfilter: conntrack: fix nf_conntrack_expect_max default value in documentation Shaojie Sun
2026-09-16 18:22 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox