Archives by Category
Contact
- Hagen Paul Pfeifer
- http://jauu.net
- hagen@jauu.net (encrypted preferred)
- KeyId: 0x98350C22
- Telephone: +49 174 5455209
Follow this blog
BPF Filter Complexity versus Execution Time
JUN 2010
10
- Published in: networking
- | Time: 00:23:11 CEST
- | SHA1: c65eec415c4e449932fc2b1c6862aff01cfe946f
Today after some time-killing IETF debates I started to analyze the in-kernel BPF filter
execution time for different BDP filters. Starting with no filter, which is
translated into a simple BPF_RET|BPF_K OPCODE till some more complex
instructions. The average execution time lies somewhere at 300ns for no filter
and somewhere above 350ns for a simple ICMP filter with 17 CPU instructions on
my x86_64 (excluding call overhead).
The next image illustrates this (statistically sampled data):
![]()