From: Florian Westphal <fw@strlen.de>
To: Alireza Asgari <alireza@asgari.net>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Phil Sutter <phil@nwl.cc>,
netfilter-devel <netfilter-devel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
kunit-dev <kunit-dev@googlegroups.com>
Subject: Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps
Date: Fri, 6 Nov 2026 15:55:52 +0100 [thread overview]
Message-ID: <au3qeEf0LVzO84d3@strlen.de> (raw)
In-Reply-To: <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net>
Alireza Asgari <alireza@asgari.net> wrote:
> Thanks for the review.
>
> I understand that batch verdicts are intended to be used in strict sequence. The scenarios motivating this RFC did not establish a failure under that usage model, and the evidence presented does not justify the additional epoch and missing-boundary handling.
>
> I’ll drop the current series. I also understand that the proposed collision disposition being reasonable does not by itself establish a need for the duplicate-ID guard. I would revisit that separately only if I can provide a concrete use case.
>
> Thanks for taking the time to review it.
If you want to work on something else that is actually a problem, then
you could investigate the mem exhaustion issue.
The current limitation is queue length based, this is very old from
a time when GSO/TSO aggregate skbs did not exist.
Untested idea:
1. compute a memory size limit based off the old NFQA_CFG_QUEUE_MAXLEN:
sizeof(sk_buff shell structure) + 2048 (half a 4k page).
2. store skb->truesize in the entry struct when queueing.
3. charge the truesize to the queue entry (and uncharge on reinject).
4. in addition to the queue length check, also check if the new
skb->truesize would bring us over the limit, refuse queueing if thats
the case.
5. Make sure NFQA_CFG_QUEUE_MAXLEN updates continue to work.
This leaves on major issue: userspace can request 64k queues, so these
limits don't help.
One possible solution:
1. For init netns, no changes.
2. For non-init netns:
at queue creation time resp. when limit is altered, pre-charge
the worst case occupancy to kmemcg.
Refuse queue creation if that fails.
Ideally this could be split into several patches to ease review.
Thanks.
next prev parent reply other threads:[~2026-11-06 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 0:37 [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps Alireza Asgari via B4 Relay
2026-11-06 0:37 ` [PATCH RFC net 1/3] netfilter: nfnetlink_queue: reject duplicate pending packet IDs Alireza Asgari via B4 Relay
2026-11-06 0:37 ` [PATCH RFC net 2/3] netfilter: nfnetlink_queue: fix batch verdict ordering across large ID gaps Alireza Asgari via B4 Relay
2026-11-06 4:45 ` Florian Westphal
2026-11-06 0:37 ` [PATCH RFC net 3/3] netfilter: nfnetlink_queue: test packet ID ordering and collisions Alireza Asgari via B4 Relay
2026-11-06 0:41 ` [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps netdev-bot+sinfo
2026-11-06 4:54 ` Florian Westphal
2026-11-06 9:46 ` Alireza Asgari
2026-11-06 14:55 ` Florian Westphal [this message]
2026-11-06 15:42 ` Alireza Asgari
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=au3qeEf0LVzO84d3@strlen.de \
--to=fw@strlen.de \
--cc=alireza@asgari.net \
--cc=kunit-dev@googlegroups.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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