From: Florian Westphal <fw@strlen.de>
To: scott.k.mitch1@gmail.com
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org
Subject: Re: [PATCH v8] netfilter: nfnetlink_queue: optimize verdict lookup with hash table
Date: Sat, 24 Jan 2026 17:49:38 +0100 [thread overview]
Message-ID: <aXT4IvpC0wY0bor9@strlen.de> (raw)
In-Reply-To: <20260123220930.43860-1-scott.k.mitch1@gmail.com>
scott.k.mitch1@gmail.com <scott.k.mitch1@gmail.com> wrote:
> From: Scott Mitchell <scott.k.mitch1@gmail.com>
>
> The current implementation uses a linear list to find queued packets by
> ID when processing verdicts from userspace. With large queue depths and
> out-of-order verdicting, this O(n) lookup becomes a significant
> bottleneck, causing userspace verdict processing to dominate CPU time.
>
> Replace the linear search with a hash table for O(1) average-case
> packet lookup by ID. A global rhashtable spanning all network
> namespaces attributes hash bucket memory to kernel but is subject to
> fixed upper bound.
>
> Signed-off-by: Scott Mitchell <scott.k.mitch1@gmail.com>
Thanks for addressing all my comments, I don't see anything else
that would block this from getting merged.
prev parent reply other threads:[~2026-01-24 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 22:09 [PATCH v8] netfilter: nfnetlink_queue: optimize verdict lookup with hash table scott.k.mitch1
2026-01-24 16:49 ` Florian Westphal [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=aXT4IvpC0wY0bor9@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=scott.k.mitch1@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox