🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #12229

Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps

#12229
From: Alireza Asgari
Date: Fri, 06 Nov 2026 15:42
67 lines
12169 bytes
Hi Florian,

Thanks for the pointers. I’d like to give this a try. I’ll take some time to understand the code first and follow up with what I find.



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>
Date: Fri, 06 Nov 2026 15:55:52 +0100
Subject: Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps

 > 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. 
 > 
Technical Details
Message-ID: <1a1b1863ff2.22494b4c856594.8212473696088017300@asgari.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358059-linux-kernel-netdev=dewy.ru
References: <20261106-nfqueue-review-v1-0-b6c933f44943@asgari.net> <au1difVZWMSV78wV@strlen.de> <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net> <au3qeEf0LVzO84d3@strlen.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358059-linux-kernel-netdev=dewy.ru
From: alireza@asgari.net (Alireza Asgari)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet
 ID reuse and large gaps
Date: Fri, 06 Nov 2026 16:42:07 +0100
Organization: Usenet Network
Message-ID: <1a1b1863ff2.22494b4c856594.8212473696088017300@asgari.net>
References: <20261106-nfqueue-review-v1-0-b6c933f44943@asgari.net> <au1difVZWMSV78wV@strlen.de> <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net> <au3qeEf0LVzO84d3@strlen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3915161"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:3aPj8GIYhZc05jFZLel7deT4mr0= sha256:ys11wsrjDw0TGHqjCWN9L77F1gHc3tZa6ltn46VxxN4=
	sha1:hloSjGUssxxwBT1DbbI6oJ9N7UM= sha256:abzpPQE0OX/38xafOLaod+Ma2dyfsg1B4CBooBxYvYk=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 082C111329B; Fri,  6 Nov 2026 18:45:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.851
X-Spam-Status: No, score=-2.851 tagged_above=-9999 required=6.31
	tests=[DKIM_INVALID=0.1, DKIM_SIGNED=0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key)
	reason="fail (message has been altered)" header.d=asgari.net
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id XPgKDnBwcuUm;
	Fri,  6 Nov 2026 18:45:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-358059-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=asgari.net
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 8E2D2113271; Fri,  6 Nov 2026 18:45:35 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id CB7696052C4; Fri,  6 Nov 2026 15:42:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793979743;
	b=O27y6ecDxBzyQq356nLb5Rq0RoZWVQaxRZvX0pbYNjpzttXBJLyRnnV6AQV3OUCQnnhn
	 7cvnDBwRTG0iu39NyzekMrEVUMYNZoG/K0An+8Ywu48dy7yNbxZaaAIajsEMeo9ktsM90
	 gcKqj0wgxhOX2xjLriNnjXjJ3Jm0eFZgxjAcz0olVm+DqgwtHRKCKlJZIXJbvpV9xchD0
	 sr0/3qZnsgiTmdvP0tTYeOSBI1gGoZ2k5RFZcogNnvCOPCZRP2BmDMRaMnsq+fKR8Guab
	 nJHlLPYNwQlFqU2vb/mtVR+EEGH36A+WPf4HdnvsxFAVOwdx/agEfhgp/x0sNofPoZQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793979743;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Message-ID:In-Reply-To:References:Subject:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:Importance:User-Agent:X-Mailer;
	bh=v0mcE5o+mEfokba0wzKYkjJQYfiDpuF/z2AJeteosKc=;
	b=JV9G8ifI2WALFol5IkSjnm9kWhQU0fLZzQm8uyVoPMWqhRA4NEUgf2/BDYkn4seVHgMT
	 lNz7eFaA6cDzKF/LAmG14M67fh/mfDrDrws926Ge+ygosIhfviVohTi2uoHZXy8Sxm8Cw
	 0gYtXr7UYJAoojBQXqsFy+ymbGEIBUchj52js2W4/Gx0RdfHe1UdvbFDIGm4GlssYzoIu
	 D8X+sgXtLLW6XeSSOxk/NOk7dgFVXLbGfM0B/3xb1Ry5n1NeAay0zItw+//3qKPznP2po
	 ypdECpyp4hde/LmglMAfuqaD2koIV/VflIoYvu4OswpIy2DOGk4EEsKj79yEJ0LrLxg==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=fail reason="signature verification failed" header.d=asgari.net header.i=@asgari.net header.a=rsa-sha256 header.s=zmail header.b=cA34GPsB;
	dmarc=none header.from=asgari.net;
	spf=pass smtp.mailfrom=asgari.net;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A276606A33B;
	Fri,  6 Nov 2026 15:42:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=asgari.net header.i=@asgari.net header.a=rsa-sha256 header.s=zmail header.b=cA34GPsB
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=136.143.169.50
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793979739;
	b=jL4TztvhrnKnpGuyjV2+e83LjhByqevdjyR6OdMOvjz5u6XiCtV78RsiL16wmzS+sQ4G
	 pAWSgwGxzWy+CMVUe0lk6L/0ByvplZbFExQMs6Zp1P2om/pfvJE3LPLcRu9mRVOC4/eYc
	 sdgBi5dwXOR6w+B0JqC0kR2MbU7nqFc9ae/BND1q4gEpDeKBesKzbsKAtvbzHRk8N6fkz
	 6qfB9q1oLgIIr/XwEuxZ0BU+X/YaCK5aOfsOb6LZSt8ZPso1ztu4cVjctWlbNMh1789G4
	 mOOwU0IM4iqnEQsb16iGDf/kdwz+4uzfRweyfPsLcNrSLmysXh2f9/4GFPbFNyxB1xg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793979739;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Message-ID:
	 In-Reply-To:References:Subject:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:Importance:User-Agent:X-Mailer;
	bh=v0mcE5o+mEfokba0wzKYkjJQYfiDpuF/z2AJeteosKc=;
	b=vxhvrRnPMAuHuGSchDI4S5ONPZPdO25ESMLOUkvtuECWRDtYBDBjtYNYx39ZS+6JIzeE
	 X5PY/VaFJBDEWVrcKtb5sxSzlp0lw6gbF4NFz7gijfzC+b3ERXRMDpFNPHXPJfwG9F33I
	 0kw7M8e4FQloRm0Iox30boj20KFz+mE04Ri4hIqKqr5CX1wn9XwZy36sOgI9kppkiJXML
	 LNgrIYiXo2dTeBiNUc3ZKdA1lhPJpfQy01sEwcmcJHW4YuDIR4mOV2OfcwF3InKbBQ1xe
	 nUMFqP8sn61ze6wSI8cPEISsZ1ivQBxoWPmgoEuk8/0Io/17tMcoqbxyFCHYdPW32yw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=asgari.net;
	spf=pass smtp.mailfrom=asgari.net;
	dkim=pass header.d=asgari.net header.i=@asgari.net header.a=rsa-sha256 header.s=zmail header.b=cA34GPsB;
	arc=pass header.oldest-pass=0 smtp.remote-ip=136.143.169.50
X-Received: from sender-of-o50.zoho.eu (sender-of-o50.zoho.eu [136.143.169.50])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0D59606D833;
	Fri,  6 Nov 2026 15:42:16 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E0D59606D833
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=asgari.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=asgari.net
X-ARC-Seal: i=1; a=rsa-sha256; t=1793979729; cv=none; 
	d=zohomail.eu; s=zohoarc; 
	b=ZvM0nvnr4mCdsXkGh05UM6rSz4LNIhu27OnfvN1FpKh/VM/9GgqF6NKl5JKtfSXRplfc5hNlh5JDtOJs+GN7uc7Lgo3eql93max1cJwHsKOP2WRhkS0xyzQQ6NSVPVo1fGEZyX3UVBKTguK4FQscISpYqk5kUZ4vdC9aqOne3xk=
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; 
	t=1793979729; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; 
	bh=v0mcE5o+mEfokba0wzKYkjJQYfiDpuF/z2AJeteosKc=; 
	b=LGJENBlh1mpEvOxUDvn4UHeTc1hWY+LcpcpgZnxSExfl9VJQ7pJ/bKDfRq1/3D6q+dO3vAA9ehuIKf7SiYGmfiv6p67WGL+bk5C1ygiVA3MRD6cxA4RDpylMPRv2gBvg5mcR9TQ29+mHDn2qfOehyuIHGTOTeH8HECE5eLaFedw=
X-ARC-Authentication-Results: i=1; mx.zohomail.eu;
	dkim=pass  header.i=asgari.net;
	spf=pass  smtp.mailfrom=alireza@asgari.net;
	dmarc=pass header.from=<alireza@asgari.net>
X-DKIM-Signature: a=rsa-sha256; b=cA34GPsBkXzs4Icrlstu7swvyhxBpFTAXQJObKq8ZTfblwGjzK8k2EFZH77aUR97c9vRLi1Z0JWkZ2BWdbyWsrntzCDv0KU2ZjTtqAZTtjjX26olVKiNEoH4PSvE6a6blCmcx9fr1sXieTRPueBlcd/GmpHKAcv1xHDtqefV3WA=; c=relaxed/relaxed; s=zmail; d=asgari.net; v=1; bh=v0mcE5o+mEfokba0wzKYkjJQYfiDpuF/z2AJeteosKc=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc;
X-Received: from mail.zoho.eu by mx.zoho.eu
	with SMTP id 1793979727867542.1179257146615; Fri, 6 Nov 2026 16:42:07 +0100 (CET)
X-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>
X-In-Reply-To: <au3qeEf0LVzO84d3@strlen.de>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Importance: Medium
X-User-Agent: Zoho Mail
X-Mailer: Zoho Mail