skip to main content
10.1145/3365609.3365858acmconferencesArticle/Chapter ViewAbstractPublication PagescommConference Proceedingsconference-collections
research-article

Autogenerating Fast Packet-Processing Code Using Program Synthesis

Published: 14 November 2019 Publication History

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.

Supplementary Material

MP4 File (p150-gao.mp4)

References

[1]
An eBPF overview, part 1: Introduction. https://www.collabora.com/news-and-blog/blog/2019/04/05/an-ebpf-overview-part-1-introduction/.
[2]
Arista 7170 Multi-function Programmable Networking. https://www.arista.com/assets/data/pdf/Whitepapers/7170_White_Paper.pdf.
[3]
Concurrency Model for P4. https://github.com/p4lang/p4-spec/issues/48.
[4]
DepQBF Solver. http://lonsing.github.io/depqbf/.
[5]
DPDK: Data Plane Development Kit. http://dpdk.org/.
[6]
High-Capacity StrataXGS Trident 4 Ethernet Switch Series. https://www.broadcom.com/products/ethernet-connectivity/switching/strataxgs/bcm56880-series.
[7]
LiquidIO II Smart NICs. https://www.marvell.com/ethernet-adapters-and-controllers/liquidio-smart-nics/index.jsp.
[8]
MarkusRabe/cadet: A fast and certifying solver for quantified Boolean formulas. https://github.com/MarkusRabe/cadet.
[9]
Netronome Agilio SmartNICs. https://www.netronome.com/products/smartnic/overview/.
[10]
NPL Specification. https://github.com/nplang/NPL-Spec.
[11]
P4 Studio | Barefoot. https://www.barefootnetworks.com/products/brief-p4-studio/.
[12]
P4_16 Language Specification. https://p4.org/p4-spec/docs/P4-16-v1.1.0-spec.html.
[13]
P4_16 Language Specification Concurrency Model. https://p4.org/p4-spec/docs/P4-16-v1.1.0-spec.html#sec-concurrency.
[14]
Product Brief Tofino Page | Barefoot. https://barefootnetworks.com/products/brief-tofino/.
[15]
Programming the Forwarding Plane - Nick McKeown. https://forum.stanford.edu/events/2016/slides/plenary/Nick.pdf.
[16]
Quantified Boolean Formula. https://en.wikipedia.org/wiki/True_quantified_Boolean_formula.
[17]
Sketch Source Code. https://people.csail.mit.edu/asolar/sketch-1.7.5.tar.gz.
[18]
The art of writing eBPF programs: a primer.|Sysdig. https://sysdig.com/blog/the-art-of-writing-ebpf-programs-a-primer/.
[19]
The P4 Language Specification. https://p4.org/p4-spec/p4-14/v1.0.5/tex/p4.pdf.
[20]
The Z3 Theorem Prover. https://github.com/Z3Prover/z3.
[21]
XDP - IO Visor Project. https://www.iovisor.org/technology/xdp.
[22]
A. Abate, C. David, P. Kesseli, D. Kroening, and E. Polgreen Counterexample Guided Inductive Synthesis Modulo Theories. In Computer Aided Verification, 2018.
[23]
M. B. S. Ahmad and A. Cheung. Automatically Leveraging MapReduce Frameworks for Data-Intensive Applications. In SIGMOD, 2018.
[24]
M. B. S. Ahmad and A. Cheung. Automatically Leveraging MapReduce Frameworks for Data-Intensive Applications. In SIGMOD, 2018.
[25]
R. Alur, R. Bodik G. Juniwal, M. M. K. Martin, M. Raghothaman, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-guided synthesis. In 2013 Formal Methods in Computer-Aided Design, 2013.
[26]
M. T. Arashloo, Y. Koral, M. Greenberg, J. Rexford, and D. Walker. SNAP: Stateful Network-Wide Abstractions for Packet Processing. In SIGCOMM, 2016.
[27]
S. Bansal and A. Aiken. Automatic Generation of Peephole Superoptimizers. In ASPLOS, 2006.
[28]
R. Birkner, D. D. Cohen, L. Vanbever, and M. Vechev. Config2Spec: Mining Network Specifications from Network Configurations. In NSDI, 2020.
[29]
J. Bornholt, E. Torlak, L. Ceze, and D. Grossman. Approximate Program Synthesis. In Workshop on Approximate Computing Across the Stack, 2015.
[30]
J. Bornholt, E. Torlak, D. Grossman, and L. Ceze. Optimizing Synthesis with Metasketches. In POPL, 2016.
[31]
P. Bosshart, D. Daly, G. Gibb, M. Izzard, N. McKeown, J. Rexford, C. Schlesinger, D. Talayco, A. Vahdat, G. Varghese, and D. Walker. P4: Programming Protocol-independent Packet Processors. SIGCOMM CCR, 2014.
[32]
P. Bosshart, G. Gibb, H.-S. Kim, G. Varghese, N. McKeown, M. Izzard, F. Mujica, and M. Horowitz. Forwarding Metamorphosis: Fast Programmable Match-action Processing in Hardware for SDN. In SIGCOMM, 2013.
[33]
A. El-Hassany, P. Tsankov, L. Vanbever, and M. Vechev. NetComplete: Practical Network-Wide Configuration Synthesis with Autocompletion. In NSDI, 2018.
[34]
H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Neural Acceleration for General-Purpose Approximate Programs. In MICRO, 2012.
[35]
W.-c. Feng, K. G. Shin, D. D. Kandlur, and D. Saha. The BLUE Active Queue Management Algorithms. IEEE/ACM Transactions on Networking, 2002.
[36]
D. Firestone, A. Putnam, S. Mundkur, D. Chiou, A. Dabagh, M. Andrewartha, H. Angepat, V. Bhanu, A. Caulfield, E. Chung, H. K. Chandrappa, S. Chaturmohta, M. Humphrey, J. Lavier, N. Lam, F. Liu, K. Ovtcharov, J. Padhye, G. Popuri, S. Raindel, T. Sapre, M. Shaw, G. Silva, M. Sivakumar, N. Srivastava, A. Verma, Q. Zuhair, D. Bansal, D. Burger, K. Vaid, D. A. Maltz, and A. Greenberg. Azure Accelerated Networking: SmartNICs in the Public Cloud. In NSDI, 2018.
[37]
S. Floyd and V. Jacobson. Random Early Detection Gateways for Congestion Avoidance. IEEE/ACM Trans. Netw., Aug. 1993.
[38]
S. Kamil, A. Cheung, S. Itzhaky, and A. Solar-Lezama. Verified Lifting of Stencil Computations. In PLDI, 2016.
[39]
S. Kamil, A. Cheung, S. Itzhaky, and A. Solar-Lezama. Verified Lifting of Stencil Computations. In PLDI, 2016.
[40]
A. Kaufmann, S. Peter, N. K. Sharma, T. Anderson, and A. Krishnamurthy. High Performance Packet Processing with FlexNIC. In ASPLOS, 2016.
[41]
H. Massalin. Superoptimizer: A Look at the Smallest Program. In ASPLOS, 1987.
[42]
J. McClurg, H. Hojjat, P. Černý, and N. Foster. Efficient Synthesis of Network Updates. In PLDI, 2015.
[43]
S. Misailovic, M. Carbin, S. Achour, Z. Qi, and M. C. Rinard. Chisel: Reliability- and Accuracy-aware Optimization of Approximate Computational Kernels. In OOPSLA, 2014.
[44]
M. Moshref, M. Yu, R. Govindan, and A. Vahdat. DREAM: Dynamic Resource Allocation for Software-defined Measurement. In SIGCOMM, 2014.
[45]
S. Narayana, A. Sivaraman, V. Nathan, P. Goyal, V. Arun, M. Alizadeh, V. Jeyakumar, and C. Kim. Language-Directed Hardware Design for Network Performance Monitoring. In SIGCOMM, 2017.
[46]
P. M. Phothilimthana, T. Jelvis, R. Shah, N. Totla, S. Chasins, and R. Bodik. Chlorophyll: Synthesis-aided Compiler for Low-power Spatial Architectures. In PLDI, 2014.
[47]
P. M. Phothilimthana, A. Thakur, R. Bodik, and D. Dhurjati. Scaling Up Superoptimization. In ASPLOS, 2016.
[48]
A. D. Robison. Impact of Economics on Compiler Optimization. In Proceedings of the 2001 Joint ACM-ISCOPE Conference on Java Grande, 2001.
[49]
S. Saha, S. Prabhu, and P. Madhusudan. NetGen: Synthesizing Data-plane Configurations for Network Policies. In SOSR, 2015.
[50]
A. Sampson, W. Dietl, E. Fortuna, D. Gnanapragasam, L. Ceze, and D. Grossman. EnerJ: Approximate Data Types for Safe and General Low-power Computation. In PLDI, 2011.
[51]
E. Schkufza, R. Sharma, and A. Aiken. Stochastic Superoptimization. In ASPLOS, 2013.
[52]
S. Sidiroglou-Douskos, S. Misailovic, H. Hoffmann, and M. Rinard. Managing Performance vs. Accuracy Trade-offs with Loop Perforation. In ESEC/FSE, 2011.
[53]
R. Singh, S. Gulwani, and A. Solar-Lezama. Automated Feedback Generation for Introductory Programming Assignments. In PLDI, 2013.
[54]
S. Sinha, S. Kandula, and D. Katabi. Harnessing TCPs Burstiness using Flowlet Switching. In HotNets, 2004.
[55]
A. Sivaraman. Designing Fast and Programmable Routers. PhD thesis, EECS Department, Massachusetts Institute of Technology, September 2017.
[56]
A. Sivaraman, A. Cheung, M. Budiu, C. Kim, M. Alizadeh, H. Balakrishnan, G. Varghese, N. McKeown, and S. Licking. Packet Transactions: High-Level Programming for Line-Rate Switches. In SIGCOMM, 2016.
[57]
A. Solar Lezama. Program Synthesis By Sketching. PhD thesis, EECS Department, University of California, Berkeley, Dec 2008.
[58]
A. Solar-Lezama, C. G.Jones, and R. Bodik. Sketching Concurrent Data Structures. In PLDI, 2008.
[59]
A. Solar-Lezama, L. Tancau, R. Bodik, S. Seshia, and V. Saraswat. Combinatorial Sketching for Finite Programs. In ASPLOS, 2006.
[60]
H. Song. Protocol-oblivious Forwarding: Unleash the Power of SDN Through a Future-proof Forwarding Plane. In Proceedings of the Second ACM SIGCOMM Workshop on Hot Topics in Software Defined Networking, 2013.
[61]
K. Subramanian, L. D'Antoni, and A. Akella. Genesis: Synthesizing Forwarding Tables in Multi-tenant Networks. In POPL, 2017.
[62]
K. Subramanian, L. D'Antoni, and A. Akella. Synthesis of fault-tolerant distributed router configurations. Proc. ACM Meas. Anal. Comput. Syst., Apr. 2018.
[63]
C. Tai, J. Zhu, and N. Dukkipati. Making Large Scale Deployment of RCP Practical for Real Networks. In INFOCOM, 2008.
[64]
E. Torlak and R. Bodik. Growing Solver-aided Languages with Rosette. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software, 2013.

Cited By

View all
  • (2024)SiriusProceedings of the 21st USENIX Symposium on Networked Systems Design and Implementation10.5555/3691825.3691852(477-490)Online publication date: 16-Apr-2024
  • (2024)FPGA Technology Mapping Using Sketch-Guided Program SynthesisProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3620665.3640387(416-432)Online publication date: 27-Apr-2024
  • (2024)Toward Resource-Efficient and High- Performance Program Deployment in Programmable NetworksIEEE/ACM Transactions on Networking10.1109/TNET.2024.341338832:5(4270-4285)Online publication date: Oct-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
HotNets '19: Proceedings of the 18th ACM Workshop on Hot Topics in Networks
November 2019
176 pages
ISBN:9781450370202
DOI:10.1145/3365609
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 November 2019

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

HotNets '19
Sponsor:
HotNets '19: The 18th ACM Workshop on Hot Topics in Networks
November 13 - 15, 2019
NJ, Princeton, USA

Acceptance Rates

Overall Acceptance Rate 110 of 460 submissions, 24%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)23
  • Downloads (Last 6 weeks)1
Reflects downloads up to 13 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)SiriusProceedings of the 21st USENIX Symposium on Networked Systems Design and Implementation10.5555/3691825.3691852(477-490)Online publication date: 16-Apr-2024
  • (2024)FPGA Technology Mapping Using Sketch-Guided Program SynthesisProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3620665.3640387(416-432)Online publication date: 27-Apr-2024
  • (2024)Toward Resource-Efficient and High- Performance Program Deployment in Programmable NetworksIEEE/ACM Transactions on Networking10.1109/TNET.2024.341338832:5(4270-4285)Online publication date: Oct-2024
  • (2024)An open-source P416 compiler backend for reconfigurable match-action table switches: Making networking innovation accessibleComputer Networks10.1016/j.comnet.2024.110246242(110246)Online publication date: Apr-2024
  • (2023)eHDL: Turning eBPF/XDP Programs into Hardware Designs for the NICProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 310.1145/3582016.3582035(208-223)Online publication date: 25-Mar-2023
  • (2023)Comparative Synthesis: Learning Near-Optimal Network Designs by QueryProceedings of the ACM on Programming Languages10.1145/35711977:POPL(91-120)Online publication date: 11-Jan-2023
  • (2022)Holistic Resource Scheduling for Data Center In-Network ComputingIEEE/ACM Transactions on Networking10.1109/TNET.2022.317478330:6(2448-2463)Online publication date: Dec-2022
  • (2021)Don't You Worry 'Bout a PacketProceedings of the 20th ACM Workshop on Hot Topics in Networks10.1145/3484266.3487395(99-107)Online publication date: 10-Nov-2021
  • (2021)AquilaProceedings of the 2021 ACM SIGCOMM 2021 Conference10.1145/3452296.3472937(17-32)Online publication date: 9-Aug-2021
  • (2021)Switches for HIRE: resource scheduling for data center in-network computingProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446760(268-285)Online publication date: 19-Apr-2021
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media