Subject: Re: [PATCH] net: filter: Convert the BPF VM to threaded code

From: Hagen Paul Pfeifer <[email-masked]>
Date: Tue, 09 Aug 2011 10:53:22 +0200

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