From: Alexei Starovoitov <ast@plumgrid.com>
To: Cong Wang <cwang@twopensource.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
John Fastabend <john.r.fastabend@intel.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: [RFC 3/3] tc: cleanup tc_classify
Date: Wed, 22 Apr 2015 15:27:33 -0700 [thread overview]
Message-ID: <55382055.1090207@plumgrid.com> (raw)
In-Reply-To: <CAHA+R7OSVs1rYcXkOM=FYoDMHGM30iWRRAVtdiJmU7jz9GRdYw@mail.gmail.com>
On 4/21/15 10:05 PM, Cong Wang wrote:
> On Tue, Apr 21, 2015 at 12:27 PM, Alexei Starovoitov <ast@plumgrid.com> wrote:
>> introduce tc_classify_act() and qdisc_drop_bypass() helper functions to reduce
>> copy-paste among different qdiscs
>
>
> I don't think qdisc_drop_bypass() is more readable than without it,
> maybe you need a better name, or just leave the code as it is.
what would be a better name? I'm open to suggestions.
We already have qdisc_drop() that does:
kfree_skb(skb);
qdisc_qstats_drop(sch);
my proposed qdisc_drop_bypass() does stats math conditionally:
if (err & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch);
kfree_skb(skb);
So together I think they fit nicely. With this helper the sch_choke.c
looks like:
congestion_drop:
qdisc_drop(skb, sch);
return NET_XMIT_CN;
other_drop:
qdisc_drop_bypass(skb, sch, ret);
return ret;
and in the next set of cleanups I'm planning to combine these two
helpers into one, but I need to cleanup __NET_XMIT_BYPASS flag first.
next prev parent reply other threads:[~2015-04-22 22:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 19:27 [RFC 0/3] tc cleanup? Alexei Starovoitov
2015-04-21 19:27 ` [RFC 1/3] tc: fix return values of ingress qdisc Alexei Starovoitov
2015-04-22 4:59 ` Cong Wang
2015-04-22 22:04 ` Alexei Starovoitov
2015-04-22 23:29 ` Cong Wang
2015-04-23 8:46 ` Thomas Graf
2015-04-21 19:27 ` [RFC 2/3] tc: deprecate TC_ACT_QUEUED Alexei Starovoitov
2015-04-22 5:02 ` Cong Wang
2015-04-22 7:43 ` Daniel Borkmann
2015-04-22 22:22 ` Alexei Starovoitov
2015-04-22 23:39 ` Cong Wang
2015-04-23 2:46 ` Alexei Starovoitov
2015-04-23 7:13 ` Daniel Borkmann
2015-04-23 18:12 ` Cong Wang
2015-04-23 18:21 ` Daniel Borkmann
2015-04-23 18:30 ` Cong Wang
2015-04-23 20:45 ` Jamal Hadi Salim
2015-04-23 21:20 ` Florian Westphal
2015-04-23 22:13 ` Alexei Starovoitov
2015-04-23 22:33 ` Cong Wang
2015-04-23 22:51 ` Jamal Hadi Salim
2015-04-24 0:59 ` Alexei Starovoitov
2015-04-24 3:37 ` Cong Wang
2015-04-24 8:12 ` Daniel Borkmann
2015-04-27 12:31 ` Jamal Hadi Salim
2015-04-21 19:27 ` [RFC 3/3] tc: cleanup tc_classify Alexei Starovoitov
2015-04-22 5:05 ` Cong Wang
2015-04-22 22:27 ` Alexei Starovoitov [this message]
2015-04-22 23:38 ` Cong Wang
2015-04-23 8:49 ` Thomas Graf
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=55382055.1090207@plumgrid.com \
--to=ast@plumgrid.com \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
/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).