Title
Switch Code Generation using Program Synthesis
Abstract
Writing packet-processing programs for programmable switch pipelines is challenging because of their all-or-nothing nature: a program either runs at line rate if it can fit within pipeline resources, or does not run at all. It is the compiler's responsibility to fit programs into pipeline resources. However, switch compilers, which use rewrite rules to generate switch machine code, often reject programs because the rules fail to transform programs into a form that can be mapped to a pipeline's limited resources---even if a mapping actually exists. This paper presents a compiler, Chipmunk, which formulates code generation as a program synthesis problem. Chipmunk uses a program synthesis engine, SKETCH, to transform high-level programs down to switch machine code. However, naively formulating code generation as program synthesis can lead to long compile times. Hence, we develop a new domain-specific synthesis technique, slicing, which reduces compile times by 1-387x and 51x on average. Using a switch hardware simulator, we show that Chipmunk compiles many programs that a previous rule-based compiler, Domino, rejects. Chipmunk also produces machine code with fewer pipeline stages than Domino. A Chipmunk backend for the Tofino programmable switch shows that program synthesis can produce machine code for high-speed switches.
Year
DOI
Venue
2020
10.1145/3387514.3405852
SIGCOMM '20: Annual conference of the ACM Special Interest Group on Data Communication on the applications, technologies, architectures, and protocols for computer communication Virtual Event USA August, 2020
DocType
ISBN
Citations 
Conference
978-1-4503-7955-7
1
PageRank 
References 
Authors
0.35
19
9
Name
Order
Citations
PageRank
Xiangyu Gao110.35
Taegyun Kim251.08
Michael Wong316113.58
Divya Raghunathan410.69
Aatish Kishan Varma510.35
Pravein G. Kannan6936.57
Anirudh Sivaraman750528.19
Srinivas Narayana824931.63
Aarti Gupta94831260.77