netdev.vger.kernel.org archive mirror
 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] net_sched: walk through all child classes in tc_bind_tclass()
Date: Mon, 27 Jan 2020 10:53:24 +0100 (CET)	[thread overview]
Message-ID: <20200127.105324.147634448385166681.davem@davemloft.net> (raw)
In-Reply-To: <20200124012708.29366-1-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Thu, 23 Jan 2020 17:27:08 -0800

> In a complex TC class hierarchy like this:
> 
> tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit         \
>   avpkt 1000 cell 8
> tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit  \
>   rate 6Mbit weight 0.6Mbit prio 8 allot 1514 cell 8 maxburst 20      \
>   avpkt 1000 bounded
> 
> tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip \
>   sport 80 0xffff flowid 1:3
> tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip \
>   sport 25 0xffff flowid 1:4
> 
> tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 100Mbit  \
>   rate 5Mbit weight 0.5Mbit prio 5 allot 1514 cell 8 maxburst 20      \
>   avpkt 1000
> tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 100Mbit  \
>   rate 3Mbit weight 0.3Mbit prio 5 allot 1514 cell 8 maxburst 20      \
>   avpkt 1000
> 
> where filters are installed on qdisc 1:0, so we can't merely
> search from class 1:1 when creating class 1:3 and class 1:4. We have
> to walk through all the child classes of the direct parent qdisc.
> Otherwise we would miss filters those need reverse binding.
> 
> Fixes: 07d79fc7d94e ("net_sched: add reverse binding for tc class")
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied and queued up for -stable.

      reply	other threads:[~2020-01-27  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24  1:27 [Patch net] net_sched: walk through all child classes in tc_bind_tclass() Cong Wang
2020-01-27  9: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=20200127.105324.147634448385166681.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).