Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are a couple later innovations on the BPF design that are really interesting:

Mach Packet Filter: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.4...

MPF is interesting because it was designed to make packet filters fast as the primary way to dispatch packets to user-space endpoints- BPF just has to run all the filters on all the packets, but MPF will merge filter prologues and then do a switch on some common value (like the port).

Dynamic Packet Filter: http://pdos.csail.mit.edu/~engler/dpf.html

DPF takes this a step further by using a more declarative bytecode. It can merge multiple chunks of packet filters so that with layered protocols switching on IDs, ports, etc. you end up with a decision tree (or DAG maybe?). They also wrote a JIT with some interesting optimizations like picking the best dispatch method for each switch based on the number of branches, so they actually get better dispatch performance than hand-written packet demultiplexers.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: