Article View: linux.kernel.netdev
Article #12217Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps
From: Florian Westphal
Date: Fri, 06 Nov 2026 14:55
Date: Fri, 06 Nov 2026 14:55
40 lines
8893 bytes
8893 bytes
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:
<au3qeEf0LVzO84d3@strlen.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358041-linux-kernel-netdev=dewy.ruReferences:
<20261106-nfqueue-review-v1-0-b6c933f44943@asgari.net> <au1difVZWMSV78wV@strlen.de> <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net>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-358041-linux-kernel-netdev=dewy.ru From: fw@strlen.de (Florian Westphal) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <au3qeEf0LVzO84d3@strlen.de> References: <20261106-nfqueue-review-v1-0-b6c933f44943@asgari.net> <au1difVZWMSV78wV@strlen.de> <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3907247"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ApKJ6a++RBGpS6JroZPwpmGhu4I= sha256:zA8JIXP9XHGNBVag/wsI4FMxLxfWcdeQEX1FZdBWdK0= sha1:XrJ7wa6ouFECSrOdmpvt3G0FsSc= sha256:aWdE4JhslSCY8NRIYMNbhXTK0gwLp0utV3zM6OcD1BY= Content-Disposition: inline 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 993A211328A; Fri, 6 Nov 2026 18:00:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.951 X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=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-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 WvrBCsMvkSjA; Fri, 6 Nov 2026 18:00:49 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358041-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=strlen.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 4372B11327B; Fri, 6 Nov 2026 18:00:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 3160F2AB65; Fri, 6 Nov 2026 14:56:14 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793976974; b=uuJ274L16ZkKsBoH2gbo0tyKUdrFiYZPKIm2lraJIlT07+XwhvNSqszisSyCYCryhI3v tEXSLXCruzUYi1iiGM8tAzEX9PwmOX/A+0CJwIZd3Xg0hvZDUvFIgszMTUJqovNd6e7dE FWccaxw8ZFjGcSmrPOiE12YbWkRz8JBgbLsS8rXkfSjvI0fRV9U5qnjOAGknZFXXOE4Wd khp3zh415e/Vg9uVf2hgx9ILV5EzmQbGzM8a/vcy0F1/2d8sBKyTtdL0RwAUPia0tWD4a hluRbSIEx4cQNwvVk1c6/W4H7KovMTIq1FTXYIxRqUejep6Qt1U58MtNG0D6ExG4aDg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793976974; h=X-Original-To:Received:DMARC-Filter:Received:Date:From:To:Cc:Subject: Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To; bh=44Kq5PAoWNdUJGo1lbLbuFxYrkrQuyX17K7NNzXNArw=; b=SOAbpM2WmLRbSvNt0PlydQbqSVPP+jT+j73xH/+FkKgaPGIrojMD2SA14jeejr0T7RIP GkzdvZugg89qFQ+N9AeVQpe1inRb3+UDW4mSREZu5VubvBQUJ6C3Qy1YPQX88tHURAA9n j0Rm4MmZppbBe+vCPIR5xsvv5vaTD+Eru/DbhkTPDeKUjG6OT2W4rHN7yjbtmHtuERrdR tVtl1uZQvvJbufOjEt0DtGz0lrxpZl3FabR8wbrT1J/pt6q/RmyGZNmi6GuMwKLAUftKs NHFPm//3xGGvGd83wSQXGZQ6YlVrzWlecu3TTAXlHYTFmcso1fN+jwgh1Hk0UGbD8+g== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; 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 03EC0606A333; Fri, 6 Nov 2026 14:56:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.216.245.30 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793976968; b=xW6VUMyhUaRQbazt9L8Qk2T44bqeUxVWYMh70dA74E3zj9XNieLplGOnn03u6hc1TkwS 877Gc0gYpJQT+qlGGiQ3E3/tvoqjxF/5q9r+iOdJVuc6GTlngYQvpGjYzVq/QfNM+ENht ITFnmMNJPNDVNpkdMD9MQfqM1jnRXnE991ZkoufFIPC8eU0hQji2EGYEIl1hhYxJxCUsN H4+XwgdQCmgArU7NvUWTT50Mws4zxef8eu0OGKGm9YsHXx5B1fln3miPBKfCnAfsDUzDz 20e1HJL1gzjMRvX+lo0pdt+rZFBtBuxoOJKM2uNSGMPyL/t4mZlcnGmjZ1+5R0Vo9hg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793976968; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=44Kq5PAoWNdUJGo1lbLbuFxYrkrQuyX17K7NNzXNArw=; b=kxAEkYCqiqX8fRPlPxxMJ7QDsyWGH3tPSRqgpe3VKPDNm5YZBYy5tH9kVUZtFqBOABkk 5WZ3rhetKecSs19CHlBPCaBv97y7OhF65R+RVv7AoBPV20jKAnbXhgOGyO9KaiI3DNww2 x2TIB82bQhz+iMRMfuqPWXO0TCoXvYALYHOn6ou46qquUuXR2N7pK9Lzca5QNCx81drgd 2YySwME2C7gd/2NjqNWy1+PJue8/yGb8X/Th9nRKZFR1KDDiBQGJCtBA3ZdOz16DpuWwC GpHn5Tly3CljvN8UvgZTC1tTfNTLsyCuznqm2hSYPKZSr77LTPe40GnLTNh4Z26uupA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.remote-ip=91.216.245.30 X-Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 2805C606A326; Fri, 6 Nov 2026 14:56:06 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2805C606A326 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de X-Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id 9ECA36060B; Fri, 06 Nov 2026 15:55:58 +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-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-In-Reply-To: <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net>