netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hagen Paul Pfeifer <hagen@jauu.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, <rui314@gmail.com>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH] net: filter: Convert the BPF VM to threaded code
Date: Tue, 09 Aug 2011 10:53:22 +0200	[thread overview]
Message-ID: <4039f2893f574313ee14131c7f9961d3@localhost> (raw)
In-Reply-To: <1312878988.2371.9.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>


On Tue, 09 Aug 2011 10:36:28 +0200, Eric Dumazet wrote:



 

> I am speaking of one single conditional branch, the one that is done for

> every BPF instruction done in a filter. It's never taken, so must be

> predicted by the cpu. A perf session could make sure it is  ;)



Ahh, ok - perf is your friend, I know Eric ;-)



>> > +		switch ((enum bpf_inst)fentry->code) {

>> 

>> That should not differ! Eric, sure that this do the trick?

> 

> It is the way to tell gcc to make its optimizations, if they exists on

> enum switch (), as David suggested.



Argl, I see sock_filter.code is declared as __u16 not enum.





Hagen

      reply	other threads:[~2011-08-09  8:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29  8:10 [PATCH] net: filter: Convert the BPF VM to threaded code Rui Ueyama
2011-07-29  9:30 ` Eric Dumazet
2011-07-30  5:09   ` Rui Ueyama
2011-07-30  6:04     ` Eric Dumazet
2011-07-30  6:20       ` Eric Dumazet
2011-07-30  9:55     ` Francois Romieu
2011-08-01 18:16 ` Hagen Paul Pfeifer
2011-08-01 18:37   ` Eric Dumazet
2011-08-02  0:57     ` David Miller
2011-08-09  5:00       ` Eric Dumazet
2011-08-09  8:29         ` Hagen Paul Pfeifer
2011-08-09  8:36           ` Eric Dumazet
2011-08-09  8:53             ` Hagen Paul Pfeifer [this message]

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=4039f2893f574313ee14131c7f9961d3@localhost \
    --to=hagen@jauu.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rui314@gmail.com \
    /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).