Re: multi bpf filter will impact performance?

Eric Dumazet
2010-11-30T10:01:48Z

Le mardi 30 novembre 2010 à 17:22 +0800, Rui a écrit :

> step 0:
> launch 4 tcpdump processes,each applied a filter to filter out some
> GTP-U packets. seen with 'tcpdump -d', the bpf code has about 100
> lines.

So each incoming packet has to go through your 4 filters, thats a total
of ~400 bpf instructions. (a bit less in average because of the
conditionnal branches)