From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Shaojie Sun <sunshaojie@kylinos.cn>
Cc: Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH] netfilter: conntrack: fix nf_conntrack_expect_max default value in documentation
Date: Wed, 16 Sep 2026 20:22:28 +0200 [thread overview]
Message-ID: <aqreZOGHlFJfrZYd@chamomile> (raw)
In-Reply-To: <20260820125718.1027116-1-sunshaojie@kylinos.cn>
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
>
prev parent reply other threads:[~2026-09-16 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqreZOGHlFJfrZYd@chamomile \
--to=pablo@netfilter.org \
--cc=corbet@lwn.net \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=sunshaojie@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.