[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1291357953.2854.46.camel@edumazet-laptop>
Date: Fri, 03 Dec 2010 07:32:33 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: hagen@...u.net, xiaosuo@...il.com, wirelesser@...il.com,
netdev@...r.kernel.org
Subject: Re: multi bpf filter will impact performance?
Le mercredi 01 décembre 2010 à 10:18 -0800, David Miller a écrit :
> However, I think it's still valuable to write a few JIT compilers for
> the existing BPF stuff. I considered working on a sparc64 JIT just to
> see what it would look like.
>
> If people work on the BPF optimizer and BPF JITs in parallel, we'll have
> both ready at the same time. win++
I began work on implementing a BPF JIT for x86_64
My plan is to use external helpers to load skb data/metadata, to keep
BPF program very short and have no dependencies against struct layouts.
These helpers would be the three load_word, load_half, load_byte.
In case the bits are in skb head, these helpers should be fast.
For practical reasons, they would be in ASM for their fast path, and C
for the slow path. They are ASM because they are able to perform the
shortcut (in case of error, doing the stack unwind to perform the
"return 0;") so that we dont have to test their return from the JIT
program.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists