Article View: linux.kernel.netdev
Article #22737[PATCH RFC net-next 7/7] docs: networking: describe the CS7542 flowtable RFC limits
From: Fil Dunsky via B4 Relay
Date: Wed, 25 Nov 2026 20:50
Date: Wed, 25 Nov 2026 20:50
153 lines
18122 bytes
18122 bytes
From: Fil Dunsky <filipp.dunsky@gmail.com> Record the real LAN/WAN NAT qualification and its precise limits: immutable result capacity, conservative sticky-HIT aging, module lifetime restrictions and software fallback. Distinguish precursor hardware results from execution of the new Linux composition. Extend the existing network-engine file patterns. Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com> --- .../ethernet/cortina/cs7542-flowtable.rst | 112 +++++++++++++++++++++ MAINTAINERS | 5 + 2 files changed, 117 insertions(+) diff --git a/Documentation/networking/device_drivers/ethernet/cortina/cs7542-flowtable.rst b/Documentation/networking/device_drivers/ethernet/cortina/cs7542-flowtable.rst new file mode 100644 index 000000000..bedb825b6 --- /dev/null +++ b/Documentation/networking/device_drivers/ethernet/cortina/cs7542-flowtable.rst @@ -0,0 +1,112 @@ +.. SPDX-License-Identifier: GPL-2.0 + +CS7542 hardware flowtable RFC +============================ + +This RFC connects the CS7542 forwarding engine to nftables hardware +flowtables. The Ethernet driver remains the sole owner of packet DMA, +indirect tables and network-engine reset. The forwarding algorithm and +flowtable frontend are replaceable modules in this development version. +They do not map hardware registers themselves. + +Supported path +-------------- + +The current path is wired IPv4 TCP/UDP NAT through a QCA8337 switch on the +CS7542. It accepts physical user ports 1 through 5 on CPU port 0/GMAC1. +Both ingress and egress must resolve to that conduit and to the initial +network namespace. It checks the route, neighbor, bridge FDB, observed +original Ethernet header, tag format and directional route MTU before +publishing a lookup. Unsupported requests return to software processing. +Wi-Fi and IPv6 are not accelerated. + +TCP admission additionally requires an established conntrack state. The +flowtable supplies that state together with the route MTU. SYN, FIN, +fragments, IP options, low TTL and packets outside the admitted length +range remain on the CPU path. The driver does not infer a route MTU or an +established connection from flower rewrite actions. + +The QCA four-byte CPU header puts an identifier ahead of the ordinary +two-byte QCA metadata. This lets the CS7542 parser recognize the inner +IPv4 header. CPU-port ``dsa-tag-protocol = "qca4"`` selects the format. +Both configured CPU ports must agree. The default remains the ordinary +two-byte QCA format. Ethernet management frames are not usable with this +four-byte tagger, so switch register access stays on MDIO. + +Resource lifetime +----------------- + +There are 16 admitted direction selectors and eight immutable result +records in this implementation. A result includes every hardware-visible +forwarding dependency. Identical results may be shared by independent +selectors. A retired selector may be rebound only after invalidation and +complete readback, with the original immutable result still present. +Removing one selector does not retire another selector sharing its result. + +This is not general result reclamation. An incompatible result consumes +another record. Eight different retained results exhaust this small +allocation pool until a verified complete network-engine reset. Further +flows fall back to software. A successful lookup withdrawal is not treated +as proof that all in-flight hardware references have drained. + +Failed or ambiguous hardware transactions close admission and retain the +state needed for isolation and recovery. The current replaceable modules +remain pinned until the built-in manager completes checked detachment. +Ordinary arbitrary module removal and suspend are not supported by this +RFC. The Ethernet owner, switch and MDIO must be built in; forced module +removal and power management are excluded by Kconfig. Consolidating this +development interface into the Ethernet driver is an open design item. + +Activity accounting +------------------- + +The hardware HIT bit is sticky. The driver only treats an observed +zero-to-one transition as evidence of recent activity. It neither clears +the bitmap without a proven drain protocol nor fabricates packet counters +or fresh timestamps from repeated reads of the same set bit. + +Consequently an active connection can expire from the hardware flowtable +at the normal Linux timeout and be learned again in software. On the +tested OpenWrt configuration this produced one CPU packet in each direction +at about 30-second intervals. This conservative refresh is a known limit, +not evidence of uninterrupted hardware residency or accurate packet counts. + +Validation and provenance +------------------------- + +The precursor on Almond+ OpenWrt 6.18.64 was tested with the standard LuCI +hardware flow-offloading option and ordinary firewall4 NAT. LAN and WAN +were separate physical switch ports. The client was 192.168.1.2; the WAN +server was 10.42.0.1 and observed the translated router address 10.42.0.139. + +Byte-exact UDP exchanges covered IP lengths 512, 1400 and 1500 with DF +set and clear. Both directions arrived with TTL 63. With flow offload +disabled, the CPU capture contained all 72 marked packets. With hardware +offload enabled it contained four of 212 packets: the two refresh pairs +at 30 and 60 seconds. Capture reported no kernel drops. TCP exchanged +2,293,760 verified bytes over 70 seconds; TCP and UDP conntrack entries +retained HW_OFFLOAD at the 3, 35 and 69 second observations. TCP endpoints +accepted the data; this is not an independent capture-based checksum +audit of every accelerated TCP segment. + +A separate eight-connection test exercised 16 selectors sharing one result. +Seven connections kept their original selectors and continued forwarding +after the first connection was removed. These were correctness tests at a +controlled rate, not throughput or maximum-capacity benchmarks. + +The Linux RFC changes the DSA selection interface, removes laboratory +controls and adapts to current kernel APIs. Measurements of the precursor +must not be represented as an execution of these exact Linux source bytes. +Build and software-test results are recorded separately in the cover letter. + +Review questions +---------------- + +* Should directional route MTU and established TCP state be carried in the + flowtable's classifier request, or through a different common interface? +* Is the standard DSA tag-selection property appropriate for this CPU + parser constraint and the two-conduit switch setup? +* What hardware evidence would be sufficient to permit reclamation of + different result records and clearing the sticky HIT state safely? +* Should the built-in owner and replaceable algorithm be consolidated + before a non-RFC submission? diff --git a/MAINTAINERS b/MAINTAINERS index d17acadaa..a70086354 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2966,7 +2966,12 @@ M: Fil Dunsky <filipp.dunsky@gmail.com> L: netdev@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/net/cortina,cs7542-ethernet.yaml +F: Documentation/networking/device_drivers/ethernet/cortina/cs7542-flowtable.rst F: drivers/net/ethernet/cortina/cs752x_* +F: drivers/net/ethernet/cortina/cs7542* +F: drivers/net/ethernet/cortina/cs_fe_* +F: drivers/net/ethernet/cortina/flowtable/ +F: include/linux/cs7542_* ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE M: Hans Ulli Kroll <ulli.kroll@googlemail.com> -- 2.53.0
Technical Details
Message-ID:
<20261125-almondplus-offload-rfc-v1-7-703175c6340c@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371666-linux-kernel-netdev=dewy.ruReferences:
<20261125-almondplus-offload-rfc-v1-0-703175c6340c@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371666-linux-kernel-netdev=dewy.ru From: devnull+filipp.dunsky.gmail.com@kernel.org (Fil Dunsky via B4 Relay) Newsgroups: linux.kernel.netdev Subject: [PATCH RFC net-next 7/7] docs: networking: describe the CS7542 flowtable RFC limits Date: Wed, 25 Nov 2026 23:50:35 +0300 Organization: Usenet Network Message-ID: <20261125-almondplus-offload-rfc-v1-7-703175c6340c@gmail.com> References: <20261125-almondplus-offload-rfc-v1-0-703175c6340c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="299922"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0E7NXbUFggafJ/hQ/brv+oT+IXE= sha256:i/xsupEI5QzN9aRf/O0rZrZw6o+t3KpplrMljFjIkAg= sha1:vss3xYP+SQIbJ65FadsypzcwXJA= sha256:3QaErDXC+/2+qE2dS1Rs4/1HYkmK4LwfGB312XkeqhY= 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 7BE42125EA0; Wed, 25 Nov 2026 23:52:02 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.301 X-Spam-Status: No, score=-2.301 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=pass (2048-bit key) header.d=kernel.org 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 Szy7t2q5qQd0; Wed, 25 Nov 2026 23:51:48 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-371666-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 65E15125E94; Wed, 25 Nov 2026 23:51:28 +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 D64E2415EE; Wed, 25 Nov 2026 20:51:02 +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=1795639859; b=hS3rqLz5SjYO/jByLziL0l5k74Tq3r+XXRTQEGspgTpe0iKpAKe/JFV+T/4Cj9NWbmed 364nCDwbDhJs4GE2+1l0MDUtfA86HPR1obDoFZDotToOv+gi47bEmfGYnTfnzEPpOhNDB 3O7WqvWEeXqIg+7RSvoDLlmDVEM/qQ/B9PYm6GKStpf+slzGB6Xxn1zzCR5JkWcQSvZrI 6XNqkfysFOWC0U+zNqVBNbtt4RHIb/W/prMNAp347UbbwQeCzZ80QvaqFCrGqia+QVFY2 rtUpRogCGIuejGv3fscoYntci/hTgnmxhw1nwBz79kpAlaH3fTgVVVO8oxDRFomZSrw== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795639859; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=GlmkAcGc9AnZ4frKpmXLn7fY55yufhFGgXFPly53mF8=; b=swLFFKsVD/H85/DldqnuCtqkRts2mHptywpd4R6HHl2niZbITNEcfMCyIa2w/FX3kaQz 7xVbfJq/rZpeE7SLqW7/DXBOi772dAjUD0C3NzqC3COi/3c/5dRy24lnKmQYDOwtmASLN 3P2w0zXF/Y6YgP5d7PEBUNIMiuS2+ds7bQBczaED6+1LzhUL7JxySjay/TYKhick8nZKc qajWR0M5KFxpgTk592XBLieL0JmYcX6DDhjfzIP0zr8FBXaoDwbAA1YKjgAZJqgL7rNTZ AzLYmROJ/V31KNXRd9Cz4csAZvD+LQA4kKf8RYX0nkyvfARBHLjoshSBXx/8oUK9DNQ== X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lCCE2Pg0; 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 57566606A690; Wed, 25 Nov 2026 20:50:59 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lCCE2Pg0 X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795639853; b=49b+M4YOht+H7+KsMSZ7zaoh4RO0q8iVgYZSIlDZpUEt4Wf6Cvuj7+OhU43PbX4yzwKe xGPZpkHNDlf0+XC3+Q9YWkJQf6xDeB0ztZTI2CbEUr7Olp7lTuJTFYCj9Php/qzrTrSeR gpylfA/FuwGdxLT0rSc2qw9FidqvNCsRW3d9glVAqlTUWP0Xp6GOkk60eRMThTxUzFtUn GoPsHSStwpdSI5nveoL5LlIgrMXPbREmVR0CpueC47K1bvIbm24LY4Vtx16IBsf3cVPR9 fp6kKPHzTNzsIXj5hbn5n1MKvS3Mc00CeAWAHtODCB8Y2cHuCasSBLGKyUFx1V/eUdg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795639853; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=GlmkAcGc9AnZ4frKpmXLn7fY55yufhFGgXFPly53mF8=; b=VDXxGHnHGXGQxinNR3iCYDblqwF+we80aqHwAefkEFWiOg6AfWQ5r4JB94HoSxrrNDDc 0MgJnCNBpT/WYw9Qq9wdxlEt/RtCH1mYFH5/zvUdrFeYc1xqDRGTmPgtyzeOiW1vsYhyc aj6FYGHQwNewHvqVP4r0Sx0Zx3XeUbFHiZfS9O0Pw/vsJExsMsolNCM4r8Ap+RMlCa2HV 5mNEYiBbzmgm//27Y2tcKN2j5CuNcfS/JaKOcehZpYpgOmT/TnhUjHgU1k8uaCFzD44L4 7kdRKpGJNhj4qd5Ula3rJJPbT7HXueETHKu6hgz5ggXf1KBR6r4S74dAEroXeR4LvcA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lCCE2Pg0; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72E2C606A335; Wed, 25 Nov 2026 20:50:53 +0000 (UTC) X-Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 X-ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795639853; b=e9k391MsYAWXGBZ5En9ir/PoBhpY+TNXc67sKAWvx+iRTYZynX5mnkOA7Z2QZyA3FFkE x62YzTKAE6GRsNOSomNoawYw+s+nU2RuHiDVsGXniBMR787tey505auVn5x3oDwgnxpVs JLHBGvKzrPmugFYUk3/EXoM6e0wdK8LfmDwzkdsrq0RSW+c5wOquXWbdrW73yi+abBPrf ecugQ0RqSCjFL/5kmBCTKA+Q6YFW7EjQZ+wlXGKoxGVgsB43ZuJzXhHOJIq0klJlzni8T hDQ3M621/WqPimT/g6RQt/Jz5zgD47rBoLD0xOteiOlMgtRbFqLftlBnP2QWTgpIOTg== X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795639853; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=GlmkAcGc9AnZ4frKpmXLn7fY55yufhFGgXFPly53mF8=; b=e7Eko5gzA1xoLamrIbgMWr1pferPHzp946ql/5ZV1/PopOBOgI5YUcrdTQJR9Nt7cz5J jOOwNbKe3JOM8NZwL+1TFlL/FZlCV4WRXTusaNQTfilADCJ1p79WdeLG8VtHy1f+5CaGR NAuSw4u/Jgo/Kmf/pfXCafwlPWhcd3wkP7UPuy3yhXLUQ3bayX3y/UpsDp05NtDy+1tFF u341CmlBdOjHHFgud3+58ySkrflDQoQR7s512w0vmVT84LULLHeBtNUjqPhHOt1MQxNng nN+jUfuWF/xYYNyyUVH0Guq4BCuMIuIe+njh6774RPjMrg7OLwCUnFwqh1KzqP1pE2g== X-ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 X-Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 5275A1F000CF; Wed, 25 Nov 2026 20:50:42 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795639852; bh=GlmkAcGc9AnZ4frKpmXLn7fY55yufhFGgXFPly53mF8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=lCCE2Pg0EojyawFKtqz7v33Chh6n9Z0siIfqM2nL8nd9lkGt2EhNn+/IuZTiVjvtb pzsF8kRxMyd7WDChD0o/iAh393p4eHNtYyEJeOqYZ4RDg+I3peZ5oddv23SZU31WjZ UWKNApYS87m7l61rvpzDHkOwXATwhva0Vc4WZK3aJqpYl+iO1eKiiiFCiU3di28PvC yiVa2Y8sw9CF4bJ45Buz/fpA+5dhuBqv3XAke7+hzJzL040vAY5+vah8t0u6PeMehH dUct+s8e5M7ZfGEP5+REXB2QDrEmdfXAJJxLOaQH1kKkjsB7jda6APhg3r4OBIe41C fixIO//QTT0Cw== X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 2D0FE4D05B; Wed, 25 Nov 2026 20:50:32 +0000 (UTC) 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: <20261125-almondplus-offload-rfc-v1-0-703175c6340c@gmail.com> X-Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, Fil Dunsky <filipp.dunsky@gmail.com> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795639829; l=7601; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=/LLBgDu2W64JTNlAWpTpKMSB1T1Pf4WK5w8P8fK4qoU=; b=9pT84902ZU5MxLm8C/bMqb5Cm0U++CiHuoAF76UHN91JHgQgLR/IMTXkCWNXvt1L4mLae6csy DazXsyjCU5YDNQBsNdWPGV0pjCCA+Nqo8t5/3Yy9VrfP/TnRuIqBN1T X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky <filipp.dunsky@gmail.com> X-Reply-To: filipp.dunsky@gmail.com