All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: davem@davemloft.net, jhs@mojatatu.com, ast@plumgrid.com,
	edumazet@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: use jump label patching for ingress qdisc in __netif_receive_skb_core
Date: Sat, 11 Apr 2015 00:34:46 +0200	[thread overview]
Message-ID: <55285006.9040805@iogearbox.net> (raw)
In-Reply-To: <1428705014.25985.331.camel@edumazet-glaptop2.roam.corp.google.com>

On 04/11/2015 12:30 AM, Eric Dumazet wrote:
> On Fri, 2015-04-10 at 23:07 +0200, Daniel Borkmann wrote:
>> Even if we make use of classifier and actions from the egress
>> path, we're going into handle_ing() executing additional code
>> on a per-packet cost for ingress qdisc, just to realize that
>> nothing is attached on ingress.
>>
>> Instead, this can just be blinded out as a no-op entirely with
>> the use of a static key. On input fast-path, we already make
>> use of static keys in various places, e.g. skb time stamping,
>> in RPS, etc. It makes sense to not waste time when we're assured
>> that no ingress qdisc is attached anywhere.
>>
>> Enabling/disabling of that code path is being done via two
>> helpers, namely net_{inc,dec}_ingress_queue(), that are being
>> invoked under RTNL mutex when a ingress qdisc is being either
>> initialized or destructed.
>>
>> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
>
> My concern about jump labels is they add a conditional on arches where
> CONFIG_JUMP_LABEL=n
>
> They look great on x86, but not sure about say MIPS.
>
> The cost of the extra conditional on MIPS was OK to avoid a call to
> __net_timestamp(), but maybe not to avoid a simple dereference ?

Thanks for the review! I could change that test into a macro and
test if CONFIG_JUMP_LABEL=n to make that if (1) effectively.

  reply	other threads:[~2015-04-10 22:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 21:07 [PATCH net-next] net: use jump label patching for ingress qdisc in __netif_receive_skb_core Daniel Borkmann
2015-04-10 22:30 ` Eric Dumazet
2015-04-10 22:34   ` Daniel Borkmann [this message]
2015-04-10 22:40   ` Alexei Starovoitov
2015-04-11  1:14 ` Cong Wang
2015-04-11  1:41   ` Alexei Starovoitov
2015-04-11 15:40 ` Alexei Starovoitov
2015-04-13 17:35 ` 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=55285006.9040805@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.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 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.