APF : A Modular Language for Fast Packet Classification
Department of Computer Science
University of Arizona
Tucson, AZ 85721, U.S.A.
Fast packet classification---that is, the determination of the destination of a network packet---is of fundamental importance in high-performance network systems. Additionally, for flexibility reasons, it is desirable to allow applications to use their own high-level protocols where appropriate. Taken together, this demands a mechanism that permits the specification of protocols in a simple, flexible, and modular way without sacrificing performance. This paper describes APF, a language for specifying packet classifiers. The simple declarative syntax of this language makes it easy to specify even fairly complex packet structures in a clean and modular way, thereby improving reliability and maintainability. It also effects a clean separation between the specification of packet classifiers and their implementations, thereby making it possible to choose from a variety of implementations with different performance tradeoffs. In particular, as our experimental results illustrate, it can be compiled to efficient code whose speed can surpass that of well-known packet classifiers such as Pathfinder and BPF.