All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org, jhs@mojatatu.com, jiri@resnulli.us
Subject: Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump
Date: Mon, 04 May 2020 11:53:54 -0700 (PDT)	[thread overview]
Message-ID: <20200504.115354.1185304352631980931.davem@davemloft.net> (raw)
In-Reply-To: <20200501035349.31244-1-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Thu, 30 Apr 2020 20:53:49 -0700

> When we tell kernel to dump filters from root (ffff:ffff),
> those filters on ingress (ffff:0000) are matched, but their
> true parents must be dumped as they are. However, kernel
> dumps just whatever we tell it, that is either ffff:ffff
> or ffff:0000:
> 
>  $ nl-cls-list --dev=dummy0 --parent=root
>  cls basic dev dummy0 id none parent root prio 49152 protocol ip match-all
>  cls basic dev dummy0 id :1 parent root prio 49152 protocol ip match-all
>  $ nl-cls-list --dev=dummy0 --parent=ffff:
>  cls basic dev dummy0 id none parent ffff: prio 49152 protocol ip match-all
>  cls basic dev dummy0 id :1 parent ffff: prio 49152 protocol ip match-all
> 
> This is confusing and misleading, more importantly this is
> a regression since 4.15, so the old behavior must be restored.
> 
> And, when tc filters are installed on a tc class, the parent
> should be the classid, rather than the qdisc handle. Commit
> edf6711c9840 ("net: sched: remove classid and q fields from tcf_proto")
> removed the classid we save for filters, we can just restore
> this classid in tcf_block.
> 
> Steps to reproduce this:
 ...
> Fixes: a10fa20101ae ("net: sched: propagate q and parent from caller down to tcf_fill_node")
> Fixes: edf6711c9840 ("net: sched: remove classid and q fields from tcf_proto")
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied, thanks.

      parent reply	other threads:[~2020-05-04 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  3:53 [Patch net v2] net_sched: fix tcm_parent in tc filter dump Cong Wang
2020-05-02  8:48 ` Jamal Hadi Salim
2020-05-02  9:19   ` Jamal Hadi Salim
2020-05-03  2:28     ` Cong Wang
2020-05-03 12:02       ` Jamal Hadi Salim
2020-05-03 12:48         ` Jamal Hadi Salim
2020-05-04 17:42           ` Cong Wang
2020-05-03 12:50 ` Jamal Hadi Salim
2020-05-04 18:53 ` David Miller [this message]

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=20200504.115354.1185304352631980931.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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.