Thread (13 messages) 13 messages, 5 authors, 2011-08-09

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

flat view

From: Hagen Paul Pfeifer <hidden>
Date: 2011-08-09 08:53:24

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 ;-)


quoted
quoted
+		switch ((enum bpf_inst)fentry->code) {
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help