From: Alexei Starovoitov <ast@plumgrid.com>
To: Daniel Borkmann <daniel@iogearbox.net>, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: sched: consolidate tc_classify{,_compat}
Date: Wed, 26 Aug 2015 14:54:05 -0700 [thread overview]
Message-ID: <55DE357D.7010800@plumgrid.com> (raw)
In-Reply-To: <3dfe133299d033dfa52bcf63d846f3f91b56d30c.1440620622.git.daniel@iogearbox.net>
On 8/26/15 2:00 PM, Daniel Borkmann wrote:
> For classifiers getting invoked via tc_classify(), we always need an
> extra function call into tc_classify_compat(), as both are being
> exported as symbols and tc_classify() itself doesn't do much except
> handling of reclassifications when tp->classify() returned with
> TC_ACT_RECLASSIFY.
>
> CBQ and ATM are the only qdiscs that directly call into tc_classify_compat(),
> all others use tc_classify(). When tc actions are being configured
> out in the kernel, tc_classify() effectively does nothing besides
> delegating.
>
> We could spare this layer and consolidate both functions. pktgen on
> single CPU constantly pushing skbs directly into the netif_receive_skb()
> path with a dummy classifier on ingress qdisc attached, improves
> slightly from 22.3Mpps to 23.1Mpps.
Nice improvement!
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> ---
> include/net/pkt_sched.h | 4 +---
> net/core/dev.c | 2 +-
> net/sched/sch_api.c | 55 ++++++++++++++++++++++--------------------------
> net/sched/sch_atm.c | 2 +-
> net/sched/sch_cbq.c | 2 +-
> net/sched/sch_choke.c | 2 +-
> net/sched/sch_drr.c | 2 +-
> net/sched/sch_dsmark.c | 2 +-
> net/sched/sch_fq_codel.c | 2 +-
> net/sched/sch_hfsc.c | 2 +-
> net/sched/sch_htb.c | 2 +-
> net/sched/sch_multiq.c | 2 +-
> net/sched/sch_prio.c | 2 +-
> net/sched/sch_qfq.c | 2 +-
> net/sched/sch_sfb.c | 2 +-
> net/sched/sch_sfq.c | 2 +-
probably 'static inline' helper with default compat_mode=false
could have reduced the size of the diff, but I guess it's ok as it is.
> +#ifdef CONFIG_NET_CLS_ACT
> + if (unlikely(err == TC_ACT_RECLASSIFY &&
> + !compat_mode))
why line break? even single line would be well below 80 char limit...
> - if (unlikely(limit++ >= MAX_REC_LOOP)) {
> - net_notice_ratelimited("%s: packet reclassify loop rule prio %u protocol %02x\n",
> - tp->q->ops->id,
> - tp->prio & 0xffff,
> - ntohs(tp->protocol));
> - return TC_ACT_SHOT;
> - }
> - goto reclassify;
> +reset:
> + if (unlikely(limit++ >= MAX_REC_LOOP)) {
> + net_notice_ratelimited("%s: reclassify loop, rule prio %u, "
> + "protocol %02x\n", tp->q->ops->id,
> + tp->prio & 0xffff, ntohs(tp->protocol));
why drop 'packet' and add two extra ',' in the message ?
Not a big deal, just why bother?
Also breaking strings is not advised, since it hurts grepping.
Other than that.
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
next prev parent reply other threads:[~2015-08-26 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 21:00 [PATCH net-next] net: sched: consolidate tc_classify{,_compat} Daniel Borkmann
2015-08-26 21:54 ` Alexei Starovoitov [this message]
2015-08-26 22:02 ` Daniel Borkmann
2015-08-27 21:19 ` David Miller
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=55DE357D.7010800@plumgrid.com \
--to=ast@plumgrid.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--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 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.