public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox•net>
To: John Fastabend <john.fastabend@gmail•com>,
	Alexei Starovoitov <ast@fb•com>,
	davem@davemloft•net
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next] bpf: netdev is never null in __dev_map_flush
Date: Thu, 24 Aug 2017 10:34:49 +0200	[thread overview]
Message-ID: <599E8FA9.4000804@iogearbox.net> (raw)
In-Reply-To: <599E4397.5020802@gmail.com>

On 08/24/2017 05:10 AM, John Fastabend wrote:
> On 08/23/2017 06:25 PM, Alexei Starovoitov wrote:
>> On 8/23/17 6:20 PM, Daniel Borkmann wrote:
>>> No need to test for it in fast-path, every dev in bpf_dtab_netdev
>>> is guaranteed to be non-NULL, otherwise dev_map_update_elem() will
>>> fail in the first place.
>>>
>>> Signed-off-by: Daniel Borkmann <daniel@iogearbox•net>
>>
>> wow. interesting. I'm surprised you see a difference from
>> such micro-optimization.
>> Acked-by: Alexei Starovoitov <ast@kernel•org>
>
> Thanks for the clean up, I was a bit over paranoid here as well. Is
> this actually noticeable in pps benchmark or just making the code
> cleaner? Just curious.

No, just from going over the code wondering why it could be
null here but not elsewhere.

  reply	other threads:[~2017-08-24  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  1:20 [PATCH net-next] bpf: netdev is never null in __dev_map_flush Daniel Borkmann
2017-08-24  1:25 ` Alexei Starovoitov
2017-08-24  3:10   ` John Fastabend
2017-08-24  8:34     ` Daniel Borkmann [this message]
2017-08-24  5:43 ` 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=599E8FA9.4000804@iogearbox.net \
    --to=daniel@iogearbox$(echo .)net \
    --cc=ast@fb$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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