P4Testgen: An Extensible Test Oracle For P4-16

Fabian Ruffy, Jed Liu, Prathima Kotikalapudi, Vojtech Havel, Hanneli Tavante, Rob Sherwood, Vladyslav Dubina, Volodymyr Peschanenko, Anirudh Sivaraman, Nate Foster

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

Abstract

We present P4Testgen, a test oracle for the P416 language. P4Testgen supports automatic test generation for any P4 target and is designed to be extensible to many P4 targets. It models the complete semantics of the target's packet-processing pipeline including the P4 language, architectures and externs, and target-specific extensions. To handle non-deterministic behaviors and complex externs (e.g., checksums and hash functions), P4Testgen uses taint tracking and concolic execution. It also provides path selection strategies that reduce the number of tests required to achieve full coverage.We have instantiated P4Testgen for the V1model, eBPF, PNA, and Tofino P4 architectures. Each extension required effort commensurate with the complexity of the target. We validated the tests generated by P4Testgen by running them across the entire P4C test suite as well as the programs supplied with the Tofino P4 Studio. Using the tool, we have also confirmed 25 bugs in mature, production toolchains for BMv2 and Tofino.

Original languageEnglish (US)
Title of host publicationSIGCOMM 2023 - Proceedings of the ACM SIGCOMM 2023 Conference
PublisherAssociation for Computing Machinery, Inc
Pages136-151
Number of pages16
ISBN (Electronic)9798400702365
DOIs
StatePublished - Sep 10 2023
EventACM SIGCOMM 2023 Conference - New York, United States
Duration: Sep 10 2023Sep 14 2023

Publication series

NameSIGCOMM 2023 - Proceedings of the ACM SIGCOMM 2023 Conference

Conference

ConferenceACM SIGCOMM 2023 Conference
Country/TerritoryUnited States
CityNew York
Period9/10/239/14/23

ASJC Scopus subject areas

  • Hardware and Architecture
  • Software
  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'P4Testgen: An Extensible Test Oracle For P4-16'. Together they form a unique fingerprint.

Cite this