From: Hagen Paul Pfeifer <hagen@jauu.net>
To: Rui Ueyama <rui314@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: filter: Convert the BPF VM to threaded code
Date: Mon, 1 Aug 2011 20:16:52 +0200 [thread overview]
Message-ID: <20110801181652.GB2732@nuttenaction> (raw)
In-Reply-To: <CACKH++ZfNTB7Y8YhvQnZPEXpwmpWXzxQgnWniamDrjRWUwxaNw@mail.gmail.com>
* Rui Ueyama | 2011-07-29 01:10:26 [-0700]:
>Convert the BPF VM to threaded code to improve performance.
>
>The BPF VM is basically a big for loop containing a switch statement. That is
>slow because for each instruction it checks the for loop condition and does the
>conditional branch of the switch statement.
>
>This patch eliminates the conditional branch, by replacing it with jump table
>using GCC's labels-as-values feature. The for loop condition check can also be
>removed, because the filter code always end with a RET instruction.
With commit 01f2f3f6ef4d076c I reworked the BPF code so that gcc is in the
ability to generate a jump table, I double checked this. Not sure what happened
in the meantime.
Hagen
next prev parent reply other threads:[~2011-08-01 18:16 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 [this message]
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
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=20110801181652.GB2732@nuttenaction \
--to=hagen@jauu.net \
--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