All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Seddon <dave.seddon.ca@gmail.com>
To: netdev@vger.kernel.org
Cc: Dave Seddon <dave.seddon.ca@gmail.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	Simon Horman <horms@kernel.org>, Yotam Gigi <yotamg@mellanox.com>,
	Thomas Graf <tgraf@suug.ch>, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH net 3/3] selftests: tc-testing: check the echoed matchall and cgroup add
Date: Sun, 29 Nov 2026 16:42:41 -0800	[thread overview]
Message-ID: <20261130004241.4025907-4-dave.seddon.ca@gmail.com> (raw)
In-Reply-To: <20261130004241.4025907-1-dave.seddon.ca@gmail.com>

Add a matchall and a cgroup filter with "tc -echo" and check that the
echoed notification carries the filter handle. Both tests fail without
the previous two patches.

Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
---
 .../tc-testing/tc-tests/filters/cgroup.json   | 22 +++++++++++++++++++
 .../tc-testing/tc-tests/filters/matchall.json | 22 +++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/cgroup.json b/tools/testing/selftests/tc-testing/tc-tests/filters/cgroup.json
index 35c9a7dbe1c4..9bbbb6b08e2d 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/cgroup.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/cgroup.json
@@ -1232,5 +1232,27 @@
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"
         ]
+    },
+    {
+        "id": "b9d4",
+        "name": "Add cgroup filter and check the echoed notification",
+        "category": [
+            "filter",
+            "cgroup"
+        ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
+        "setup": [
+            "$TC qdisc add dev $DUMMY ingress"
+        ],
+        "cmdUnderTest": "bash -c '$TC -echo filter add dev $DUMMY parent ffff: handle 0x7 prio 1 protocol ip cgroup action ok | grep \"cgroup.*handle 0x7\"'",
+        "expExitCode": "0",
+        "verifyCmd": "$TC filter show dev $DUMMY ingress",
+        "matchPattern": "cgroup.*handle 0x7",
+        "matchCount": "1",
+        "teardown": [
+            "$TC qdisc del dev $DUMMY ingress"
+        ]
     }
 ]
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 6b3eea401fc8..c4689cb62f3e 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json
@@ -574,5 +574,27 @@
         "teardown": [
             "$TC qdisc del dev $DEV1 clsact"
         ]
+    },
+    {
+        "id": "e3c7",
+        "name": "Add ingress matchall filter and check the echoed notification",
+        "category": [
+            "filter",
+            "matchall"
+        ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
+        "setup": [
+            "$TC qdisc add dev $DUMMY ingress"
+        ],
+        "cmdUnderTest": "bash -c '$TC -echo filter add dev $DUMMY parent ffff: handle 0x7 prio 1 protocol ip matchall action ok | grep \"matchall.*handle 0x7\"'",
+        "expExitCode": "0",
+        "verifyCmd": "$TC filter show dev $DUMMY ingress",
+        "matchPattern": "matchall.*handle 0x7",
+        "matchCount": "1",
+        "teardown": [
+            "$TC qdisc del dev $DUMMY ingress"
+        ]
     }
 ]
-- 
2.56.0


  parent reply	other threads:[~2026-11-30  0:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  0:42 [PATCH net 0/3] net/sched: fix the add notification of matchall and cgroup Dave Seddon
2026-11-30  0:42 ` [PATCH net 1/3] net/sched: cls_matchall: return the new filter from mall_change() Dave Seddon
2026-11-30  0:42 ` [PATCH net 2/3] net/sched: cls_cgroup: return the new filter from cls_cgroup_change() Dave Seddon
2026-11-30  0:42 ` Dave Seddon [this message]
2026-11-30  0:48 ` [PATCH net 0/3] net/sched: fix the add notification of matchall and cgroup netdev-bot+sinfo
2026-11-30  1:00   ` dave seddon

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=20261130004241.4025907-4-dave.seddon.ca@gmail.com \
    --to=dave.seddon.ca@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tgraf@suug.ch \
    --cc=willemb@google.com \
    --cc=yotamg@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.