From: John Fastabend <john.fastabend@gmail•com>
To: Alexei Starovoitov <ast@fb•com>,
Daniel Borkmann <daniel@iogearbox•net>,
davem@davemloft•net
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next] bpf: netdev is never null in __dev_map_flush
Date: Wed, 23 Aug 2017 20:10:15 -0700 [thread overview]
Message-ID: <599E4397.5020802@gmail.com> (raw)
In-Reply-To: <1efe2357-43aa-8976-75a0-62d4572287cc@fb.com>
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.
Acked-by: John Fastabend <john.fastabend@gmail•com>
next prev parent reply other threads:[~2017-08-24 3:10 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 [this message]
2017-08-24 8:34 ` Daniel Borkmann
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=599E4397.5020802@gmail.com \
--to=john.fastabend@gmail$(echo .)com \
--cc=ast@fb$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--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