Testing compilers for programmable switches through switch hardware simulation

Michael D. Wong, Aatish Kishan Varma, Anirudh Sivaraman

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

Abstract

Programmable switches have emerged as powerful and flexible alternatives to fixed-function forwarding devices. But because of the unique hardware constraints of network switches, the design and implementation of compilers targeting these devices is tedious and error-prone. Despite the important role that compilers play in software development, there is a dearth of tools for testing compilers for programmable network devices. We present Druzhba, a programmable switch simulator used for testing compilers targeting programmable packet-processing substrates. We show that we can model the low-level behavior of a switch's programmable hardware. We further show how compiler developers can target Druzhba as a compiler backend. Generated machine code programs are fed into Druzhba and tested using a fuzzing-based approach that allows compiler developers to test the correctness of their compilers. Using a program-synthesis-based compiler as a case study, we demonstrate how Druzhba has been successful in testing compiler-generated machine code for our simulated switch pipeline instruction set.

Original languageEnglish (US)
Title of host publicationCoNEXT 2020 - Proceedings of the 16th International Conference on Emerging Networking EXperiments and Technologies
PublisherAssociation for Computing Machinery, Inc
Pages211-217
Number of pages7
ISBN (Electronic)9781450379489
DOIs
StatePublished - Nov 23 2020
Event16th ACM Conference on Emerging Networking Experiment and Technologies, CoNEXT 2020 - Barcelona, Spain
Duration: Dec 1 2020Dec 4 2020

Publication series

NameCoNEXT 2020 - Proceedings of the 16th International Conference on Emerging Networking EXperiments and Technologies

Conference

Conference16th ACM Conference on Emerging Networking Experiment and Technologies, CoNEXT 2020
Country/TerritorySpain
CityBarcelona
Period12/1/2012/4/20

Keywords

  • compilers
  • programmable data plane
  • programmable switches
  • simulation
  • software testing

ASJC Scopus subject areas

  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'Testing compilers for programmable switches through switch hardware simulation'. Together they form a unique fingerprint.

Cite this