From: Cong Wang <xiyou.wangcong@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] [PATCH net-next v12 2/7] sch_cake: Add ingress mode
Date: Wed, 16 May 2018 14:09:00 -0700 [thread overview]
Message-ID: <CAM_iQpVz9bRDkW_cqj-vo6fapXaG6zV-bWM0Sc2wmHuj-vzWqg@mail.gmail.com> (raw)
In-Reply-To: <152650254608.25701.5749607607862123240.stgit@alrua-kau>
On Wed, May 16, 2018 at 1:29 PM, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
> + if (tb[TCA_CAKE_AUTORATE]) {
> + if (!!nla_get_u32(tb[TCA_CAKE_AUTORATE]))
> + q->rate_flags |= CAKE_FLAG_AUTORATE_INGRESS;
> + else
> + q->rate_flags &= ~CAKE_FLAG_AUTORATE_INGRESS;
> + }
> +
> + if (tb[TCA_CAKE_INGRESS]) {
> + if (!!nla_get_u32(tb[TCA_CAKE_INGRESS]))
> + q->rate_flags |= CAKE_FLAG_INGRESS;
> + else
> + q->rate_flags &= ~CAKE_FLAG_INGRESS;
> + }
> +
> if (tb[TCA_CAKE_MEMORY])
> q->buffer_config_limit = nla_get_u32(tb[TCA_CAKE_MEMORY]);
>
> @@ -1559,6 +1628,14 @@ static int cake_dump(struct Qdisc *sch, struct sk_buff *skb)
> if (nla_put_u32(skb, TCA_CAKE_MEMORY, q->buffer_config_limit))
> goto nla_put_failure;
>
> + if (nla_put_u32(skb, TCA_CAKE_AUTORATE,
> + !!(q->rate_flags & CAKE_FLAG_AUTORATE_INGRESS)))
> + goto nla_put_failure;
> +
> + if (nla_put_u32(skb, TCA_CAKE_INGRESS,
> + !!(q->rate_flags & CAKE_FLAG_INGRESS)))
> + goto nla_put_failure;
> +
Why do you want to dump each bit of the rate_flags separately rather than
dumping the whole rate_flags as an integer?
next prev parent reply other threads:[~2018-05-16 21:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 20:29 [Cake] [PATCH net-next v12 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc Toke Høiland-Jørgensen
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 1/7] " Toke Høiland-Jørgensen
2018-05-16 20:44 ` Cong Wang
2018-05-16 21:13 ` Toke Høiland-Jørgensen
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 5/7] sch_cake: Add DiffServ handling Toke Høiland-Jørgensen
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 6/7] sch_cake: Add overhead compensation support to the rate shaper Toke Høiland-Jørgensen
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 3/7] sch_cake: Add optional ACK filter Toke Høiland-Jørgensen
2018-05-17 11:04 ` Eric Dumazet
2018-05-17 11:23 ` Toke Høiland-Jørgensen
2018-05-17 11:56 ` Eric Dumazet
2018-05-17 13:11 ` Toke Høiland-Jørgensen
2018-05-18 2:36 ` Ryan Mounce
2018-05-18 4:08 ` Eric Dumazet
2018-05-18 7:43 ` Ryan Mounce
2018-05-18 4:27 ` Cong Wang
2018-05-18 11:18 ` Kevin Darbyshire-Bryant
2018-05-18 11:23 ` Sebastian Moeller
2018-05-18 15:20 ` Eric Dumazet
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 4/7] sch_cake: Add NAT awareness to packet classifier Toke Høiland-Jørgensen
2018-05-16 20:56 ` Cong Wang
2018-05-16 21:14 ` Toke Høiland-Jørgensen
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 7/7] sch_cake: Conditionally split GSO segments Toke Høiland-Jørgensen
2018-05-16 20:29 ` [Cake] [PATCH net-next v12 2/7] sch_cake: Add ingress mode Toke Høiland-Jørgensen
2018-05-16 21:09 ` Cong Wang [this message]
2018-05-16 21:16 ` Toke Høiland-Jørgensen
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
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM_iQpVz9bRDkW_cqj-vo6fapXaG6zV-bWM0Sc2wmHuj-vzWqg@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=cake@lists.bufferbloat.net \
--cc=netdev@vger.kernel.org \
--cc=toke@toke.dk \
/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