Article View: linux.kernel.netdev
Article #6163[PATCH net 2/2] selftests: tc-testing: test offload flags of reused matchall actions
From: Alexandre Cassen
Date: Wed, 21 Oct 2026 19:32
Date: Wed, 21 Oct 2026 19:32
95 lines
12189 bytes
12189 bytes
Check that a skip_hw filter leaves the flags of an action it reuses
unchanged, even when the filter add fails on a later action. Also check
that a filter without skip_hw still cannot reuse a skip_hw action. The
dummy device has no tc offload, so skip_hw stands in for skip_sw.
Signed-off-by: Alexandre Cassen <acassen@corp.free.fr>
---
.../tc-testing/tc-tests/filters/matchall.json | 71 +++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json b/tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json
index f8d28c415bc3..6b3eea401fc8 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json
@@ -481,6 +481,77 @@
"$TC actions del action police index 199"
]
},
+ {
+ "id": "230c",
+ "name": "Keep the flags of a gact action reused by a matchall filter with skip_hw",
+ "category": [
+ "filter",
+ "matchall"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY ingress",
+ "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 matchall action gact pass index 199"
+ ],
+ "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x2 prio 2 protocol ipv4 matchall skip_hw action gact pass index 199",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions get action gact index 199",
+ "matchPattern": "skip_hw",
+ "matchCount": "0",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY ingress"
+ ]
+ },
+ {
+ "id": "1f7a",
+ "name": "Keep the flags of a gact action reused by a rejected matchall filter with skip_hw",
+ "category": [
+ "filter",
+ "matchall"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY ingress",
+ "$TC actions add action gact pass index 200",
+ "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 matchall action gact pass index 199"
+ ],
+ "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x2 prio 2 protocol ipv4 matchall skip_hw action gact pass index 199 action gact pass index 200",
+ "expExitCode": "2",
+ "verifyCmd": "$TC actions get action gact index 199",
+ "matchPattern": "skip_hw",
+ "matchCount": "0",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY ingress",
+ "$TC actions del action gact index 200"
+ ]
+ },
+ {
+ "id": "9117",
+ "name": "Reject the reuse of a skip_hw gact action by a matchall filter without skip_hw",
+ "category": [
+ "filter",
+ "matchall"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY ingress",
+ "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 matchall skip_hw action gact pass index 199"
+ ],
+ "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x2 prio 2 protocol ipv4 matchall action gact pass index 199",
+ "expExitCode": "2",
+ "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 2 prio 2 protocol ipv4 matchall",
+ "matchPattern": "^filter parent ffff: protocol ip pref 2 matchall.*handle 0x2.*",
+ "matchCount": "0",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY ingress"
+ ]
+ },
{
"id": "2638",
"name": "Add matchall and try to get it",
--
2.43.0
Technical Details
Message-ID:
<20261021193222.1318333-3-acassen@corp.free.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350218-linux-kernel-netdev=dewy.ruReferences:
<20261021193222.1318333-1-acassen@corp.free.fr>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-350218-linux-kernel-netdev=dewy.ru From: acassen@corp.free.fr (Alexandre Cassen) Newsgroups: linux.kernel.netdev Subject: [PATCH net 2/2] selftests: tc-testing: test offload flags of reused matchall actions Date: Wed, 21 Oct 2026 21:32:19 +0200 Organization: Usenet Network Message-ID: <20261021193222.1318333-3-acassen@corp.free.fr> References: <20261021193222.1318333-1-acassen@corp.free.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="46242"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:BJ2yMCtcFCsh8YfosnkxezCQU4U= sha256:LrWJQrs1YvLoQi6kvK5TT5joKRO3nnc92sskn+TrQ4o= sha1:1132Q07/lXM6pr2K7YisgRQoUO0= sha256:6zg/evxrswBltyZukqbVIudzOMhgDy/3VQzc1TC3Fy8= 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 710F21110FC; Wed, 21 Oct 2026 22:35:10 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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=corp.free.fr 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 CmucuHS4mriF; Wed, 21 Oct 2026 22:35:07 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-350218-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=corp.free.fr X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id B9F901110FA; Wed, 21 Oct 2026 22:34:58 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 6F1AD2BACC; Wed, 21 Oct 2026 19:32:36 +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=1792611152; b=DltQlylPFcOTjXhdiKfGhzzM2SraMQsttVpL6hXVSX2aOlNw4YX1ytFE3ZMnUL0DWh/v pEeReeP1RX026mEKC6dlsFZIulDdAzUuO/GPfbGy3F3kQIo9fCzh7qRkFb85vRvLRVv8c iO49zxOr2QT+dKODLHHf5NnGzQlBlV9gybTSOLsB/J+Rj2VilQgVNUzqeoRuKiLIEt5K1 WicS+8LjSHfhbx/lv26KSn+fBbGm1uiBTGlc2CCgHFy4rrMoNxwg+/ptTadGI8o9abCbE AcgpeX1F4GLFqeRAJ3aTxmR2HlcPYVoiW1Lvn95lOAE8oItuO/Voef3ypRbxXBPacOw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792611152; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=HfB8gb1K6eB7qErBRf5nApOb7SVOWRVqyXm7olVUNrE=; b=O2WJUMrKc6UvErI02jZY7i8tjgbmjy5X29lLvaUoDvFFyofYcf0zEQtZhepMPGAwrA3R hvX1AVPPBLUBtvlY3gPuLyXdFU8pgWLlLFuAFv49LSOen8W0VSPKCxhcSHYfS/QemhhJ3 Gl6tLU5XSuqoa9dvSvNKhuCfffZ9GWZ7482sLyJKAI5D1T15f6jjXxQFULAi2Zo4Ur4UV qiiNYiSlkTWm/5XIEcEOSn7BMo7agsHjEUpxPvLsI1EubMEzltggf17ViQL/vwBtWMWsn HXmNV/YbBgH2xR632BwZ4biV9D+II2MrBiFRrk3iLqNzck6LPeMXh67HAoHRlaS2ixg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=CUL0C01G; dmarc=pass header.from=corp.free.fr; spf=pass smtp.mailfrom=corp.free.fr; 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 612FE606A31B; Wed, 21 Oct 2026 19:32:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=CUL0C01G X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=212.27.60.169 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792611151; b=XSRLlWW2KI3sc4MG3bntywbS+lc2qaJzgLpqEYfKI1RNHfUDiqR8S0gQd0peSEGcN83q xgXf1kDgVzu7InjSeiTijXkuRH7IDxHjeD4gjsxRTvqfdKlBSlZSRzkK8WgWM9wmE77VZ DspqjZ2u23zhbQ7LEKLGHyaUm/mO4ePwS3yTETEm+lFflboXCNXHHoOfju1kWvdQZo/Vy OfIPClHQEALSCDQgTO7rMlmrm+Fc/dn1qGLO2j2Om2gUujjb8fxCS+pZJvMuCLclFVO4m m6wMe33uWGZ6ybIip2ndJJrtxbXaCyElyH2SqolG0+4J5aPhnnN5fcpOGyIp5TRoL0g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792611151; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=HfB8gb1K6eB7qErBRf5nApOb7SVOWRVqyXm7olVUNrE=; b=dY+uR9ozuiJQUTCRJ8He5qtZsu0Ua0UxXhee3AvJ9s4CUiB4R1H0zs2n4Wd3fUDuqoyd qy1x0nGGy5CnsVsk2IZH5LKAD5cmqkSG1waesLD48A4BVGhuHdv0jj9+i7Ku3YRYpU1Ll TGNM9iZHlQTooIfaDbjjn7NISzIXq8M+PShyG2B72oTLour83L8VXX61Udg6yFA/EE9m8 /3yC6QEm6lOvI7zDDHrCSEJaIwWxELYnK9RbzHYGUIxiZytKBb1W9+wH458jyXtq08XhC y5Ahh8TVzYRXCvBEuh9Z82w4VWg2XNRZ8zy7oJ7oiXGzhl7LiRUTaxuvXK0zOsMdbdg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=corp.free.fr; spf=pass smtp.mailfrom=corp.free.fr; dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=CUL0C01G; arc=none smtp.remote-ip=212.27.60.169 X-Received: from rcs.proxad.net (rcs.proxad.net [212.27.60.169]) (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 AD60D606A31D; Wed, 21 Oct 2026 19:32:30 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AD60D606A31D X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=corp.free.fr X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=corp.free.fr; s=rcs; t=1792611149; bh=0UiKimNmd/soaTpaeRFysG5BHlACOaUPTiJRSadfkK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CUL0C01GvepM6eqnGG+9wtxbhefWAkdxIvRRauSOrvKqtp7NwkG9i3sJf/EYBbbR5 c7pzLwbVELhDDu4W1642lZtuDZ/HWb4dnoIIbKGRZ1FijW4nkDGmFQfQAsnhflP0Dm TF4UkHeM/5K9QXOBHnqFXL4V/0J2U7UfDAO4UYT1RVH6S0qy9EYSzq//lTRl6Q7VqW RkdrO/vOq2u3Ww0lG85gBQsAJpM492JzFp2hCseN2riZEzMkoMdPQP4gBaqxlg4rMP 04ZoEMAnDbzl6LpwbOHNOZaPSVzBtawLtVjUasvlnHjDU1J3JJ2yCjfi8l0uOMEGYZ tjilM7y3MeOBA== X-Received: from lnxos-dev.home (82-66-150-212.subs.proxad.net [82.66.150.212]) by rcs.proxad.net (Postfix) with ESMTPSA id 1A97F44C2B44; Wed, 21 Oct 2026 21:32:29 +0200 (CEST) X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Vladimir Oltean <vladimir.oltean@nxp.com>, Ido Schimmel <idosch@nvidia.com>, Shuah Khan <shuah@kernel.org>, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <20261021193222.1318333-1-acassen@corp.free.fr> 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