Autogenerating fast packet-processing code using program synthesis

Xiangyu Gao, Taegyun Kim, Aatish Kishan Varma, Anirudh Sivaraman, Srinivas Narayana

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Packet-processing code should be fast. But, it is hard to write fast code for programmable substrates such as high-speed switches, multicore SoC SmarfNICs, FP-GAs, middleboxes, and the end-host stack. Today, expert developers with deep familiarity with the underlying hardware handcraft such code. Making things worse, building optimizing compilers for these substrates requires significant development effort, which may not be available for these new, niche, and evolving substrates. We propose an alternative: to automatically generate fast packet-processing code using program synthesis. For the domain of packet processing, using synthesis can generate faster code than an optimizing compiler at the cost of increased compile time. As a case study, we apply program synthesis to build a code generator, Chipmunk, for a simulator of the protocol-independent switch architecture (PISA). Chipmunk generates code for many programs that a previous code generator based on classical compiler optimizations rejects, and code generated by Chipmunk uses much fewer hardware resources. We also outline future directions in applying program synthesis to code generation for packet processing.

Original languageEnglish (US)
Title of host publicationHotNets 2019 - Proceedings of the 18th ACM Workshop on Hot Topics in Networks
PublisherAssociation for Computing Machinery, Inc
Pages150-160
Number of pages11
ISBN (Electronic)9781450370202
DOIs
StatePublished - Nov 13 2019
Event18th ACM Workshop on Hot Topics in Networks, HotNets 2019 - Princeton, United States
Duration: Nov 14 2019Nov 15 2019

Publication series

NameHotNets 2019 - Proceedings of the 18th ACM Workshop on Hot Topics in Networks

Conference

Conference18th ACM Workshop on Hot Topics in Networks, HotNets 2019
CountryUnited States
CityPrinceton
Period11/14/1911/15/19

    Fingerprint

ASJC Scopus subject areas

  • Computer Networks and Communications

Cite this

Gao, X., Kim, T., Varma, A. K., Sivaraman, A., & Narayana, S. (2019). Autogenerating fast packet-processing code using program synthesis. In HotNets 2019 - Proceedings of the 18th ACM Workshop on Hot Topics in Networks (pp. 150-160). (HotNets 2019 - Proceedings of the 18th ACM Workshop on Hot Topics in Networks). Association for Computing Machinery, Inc. https://doi.org/10.1145/3365609.3365858