SiPanda’s PANDA Parser
The World’s Fastest, Most Extensible, and Easiest-to-Use Open Source Parser Running on the CPU (Tom Herbert, SiPanda CTO, April 14, 2021)
SiPanda has released version 1.1 of Protocol And Network Datapath Acceleration (PANDA) to GitHub. In version 1.0 we introduced the PANDA protocol parser as a highly extensible, easy-to-program parser in the PANDA framework; in version 1.1 we added the panda-compiler, an optimizing compiler that makes the PANDA Parser fly!
Packet parsing in perhaps the most common operation in network datapath processing. Every packet received by a host or switch must be parsed to decode the contents and protocol layers of a packet to prescribe the required processing. Efficient parsing is essential for network intensive applications, such as those doing Deep Packet Inspection or DPI, as they can spend upwards of 25% to 50% of their time just parsing packets. The PANDA Parser and panda-compiler provide a solution to achieve maximum efficiency.
An instance of a PANDA parser is defined by a programmed graph data structure composed of a number of parse nodes, protocol nodes, and protocol tables. PANDA allows the construction of custom parsers for arbitrary protocols that are defined by these data structures and embedded callout functions. Best of all, the PANDA Parser is programmed as a declarative representation in straightforward C or C++.
The panda-compiler optimizes programs containing a PANDA parser. It does this by extracting the parse graph from the parser data structures embedded in the program and emits linear C code that implements the parser. This C code is actually an Intermediate Representation, or IR, that specifically optimizes the parser using techniques such as unrolling sequences of the parse path. This intermediate code is then compiled using a standard C compiler such as gcc which in turn applies standard compiler optimizations.
The net result of PANDA parser and panda-compiler is a highly efficient parser executable. This is illustrated in the test results below that compare PANDA parser, parselite (a handwritten protocol parser written to demonstrate the), and flow dissector (a port of the Linux kernel packet parser). The test results below show the latency in nanoseconds for parsing packets and extracting common metadata for the various protocols (lower times are better).
SiPanda was created to rethink the network datapath and bring both flexibility and wire-speed performance at scale to networking infrastructure. The SiPanda architecture enables data center infrastructure operators and application architects to build solutions for cloud service providers to edge compute (5G) that don’t require the compromises inherent in today’s network solutions. For more information, please visit www.sipanda.io. If you want to find out more about PANDA, you can email us at firstname.lastname@example.org.