P4DDG: data-dependent grammars for packet specification and parsing in P4
In Software-Defined Networking (SDN), the domain-specific language P4 allows developers to program the behavior of networking devices at a comparatively high level of abstraction. A P4 program defines a state machine to parse incoming packets. The parsers are flexible and efficient but may be sensitive to bugs and difficult to maintain. As a possible alternative, data-dependent grammars (DDGs) can describe both packet structure and parser at a higher level of abstraction.
In this work, we investigate the use of DDGs in P4 programs. In particular, we demonstrate how DDGs can be used to simultaneously define packets and parsers. We describe a DDG to P4 transpiler and evaluate our approach empirically. Input to our evaluation is a collection of P4 programs with for each: the original (handwritten) parser, the (handwritten) DDG and transpiler-generated parser. The handwritten and generated parsers are compared for equivalence, performance, and readability.
Our results show that the generated parsers are three times slower for grammars that do not utilize features distinguishing DDGs from traditional BNF-like grammars. When parameterized nonterminals are used, a key feature of DDGs, the generated parser is around six times slower.
Thu 3 JulDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
14:00 - 15:45 | |||
14:00 35mTalk | Integrating Static Optimization and Dynamic Nature in JavaScript GPCE DOI Media Attached | ||
14:35 35mTalk | P4DDG: data-dependent grammars for packet specification and parsing in P4 GPCE Tommaso Pacciani University of Amsterdam, Damian Frölich University of Amsterdam, L. Thomas van Binsbergen University of Amsterdam, Chrysa Papagianni University of Amsterdam Link to publication DOI Pre-print | ||
15:10 35mTalk | Retrofitting a Virtual Instrument DSL with Programming Abstractions GPCE |