P4R-Type: A Verified API for P4 Control Plane Programs
Jens Kanstrup Larsen, Roberto Guanciale, Philipp Haller, Alceste Scalas
Abstract
Software-Defined Networking (SDN) significantly simplifies programming, reconfiguring, and optimizing network devices, such as switches and routers. The de facto standard for programming SDN devices is the P4 language. However, the flexibility and power of P4, and SDN more generally, gives rise to important risks. As a number of incidents at major cloud providers have shown, errors in SDN programs can compromise the availability of networks, leaving them in a non-functional state. The focus of this paper are errors in control-plane programs that interact with P4-enabled network devices via the standardized P4Runtime API. For clients of the P4Runtime API it is easy to make mistakes that may lead to catastrophic failures, despite the use of Google’s Protocol Buffers as an interface definition language. This paper proposes P4R-Type, a novel verified P4Runtime API for Scala that performs static checks for P4 control plane operations, ruling out mismatches between P4 tables, allowed actions, and action parameters. As a formal foundation of P4R-Type, we present the F P4R calculus and its typing system, which ensure that well-typed programs never get stuck by issuing invalid P4Runtime operations. We evaluate the safety and flexibility of P4R-Type with 3 case studies. To the best of our knowledge, this is the first work that formalises P4Runtime control plane applications, and a typing discipline ensuring the correctness of P4Runtime operations.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext cbfe11da-c38d-4ecf-ade0-abcacb89b164Cited by top-tier papers2
- Computing Precise Control Interface SpecificationsEric Hayden Campbell, Hossein Hojjat, Nate FosterOOPSLA 2024 · 1 citation
- MatchBox: A Semantic Foundation for Data Plane PortabilityEric Hayden Campbell, Robert Zhang, Divyanshu Saxena, Aditya Akella et al.PLDI 2026
Builds on3
- Petr4: formal foundations for p4 data planesRyan Doenges, Mina Tahmasbi Arashloo, Santiago Bautista, Alexander Chang et al.POPL 2021 · 24 citations
- Dependently-typed data plane programmingMatthias Eichholz, Eric Hayden Campbell, Matthias Krebs, Nate Foster et al.POPL 2022 · 15 citations
- Type-level programming with match typesOlivier Blanvillain, Jonathan Immanuel Brachthäuser, Maxime Kjaer, Martin OderskyPOPL 2022 · 10 citations
Related papers
- P4BID: information flow control in p4Karuna Grewal, Loris D'Antoni, Justin HsuPLDI 2022 · 5 citations
- P4Inv: Inferring Packet Invariants for Verification of Stateful P4 ProgramsDelong Zhang, Chong Ye, Fei HeINFOCOM 2024 · 3 citations
- P4runpro: Enabling Runtime Programmability for RMT Programmable SwitchesYifan Yang, Lin He, Jiasheng Zhou, Xiaoyi Shi et al.SIGCOMM 2024 · 12 citations
- bf4: towards bug-free P4 programsDragos Dumitrescu, Radu Stoenescu, Lorina Negreanu, Costin RaiciuSIGCOMM 2020 · 38 citations
- HOL4P4: Mechanized Small-Step Semantics for P4Anoud Alshnakat, Didrik Lundberg, Roberto Guanciale, Mads DamOOPSLA 2024 · 6 citations
