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 2/3] net/sched: cls_cgroup: return the new filter from cls_cgroup_change()
Date: Sun, 29 Nov 2026 16:42:40 -0800	[thread overview]
Message-ID: <20261130004241.4025907-3-dave.seddon.ca@gmail.com> (raw)
In-Reply-To: <20261130004241.4025907-1-dave.seddon.ca@gmail.com>

Return the new filter through *arg, as the other classifiers do.
cls_cgroup_change() never sets it, so the RTM_NEWTFILTER notification
for a cgroup add or replace has handle 0 and no TCA_OPTIONS:

  # tc -echo filter add dev d0 ingress handle 7 pref 1 cgroup action ok
  added filter dev d0 ingress protocol all pref 1 cgroup chain 0

With this patch it carries handle 0x7 and the action.

Fixes: f400923735ec ("pkt_sched: Control group classifier")
Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
---
 net/sched/cls_cgroup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 28701d3916b8..521901d8538c 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -119,6 +119,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
 	if (err < 0)
 		goto errout;
 
+	*arg = new;
 	rcu_assign_pointer(tp->root, new);
 	if (head) {
 		tcf_exts_get_net(&head->exts);
-- 
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 ` Dave Seddon [this message]
2026-11-30  0:42 ` [PATCH net 3/3] selftests: tc-testing: check the echoed matchall and cgroup add Dave Seddon
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-3-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.