Table of Contents
Fetching ...

Comprehensive Verification of Packet Processing

Shengyi Wang, Mengying Pan, Andrew W. Appel

TL;DR

This work addresses the gap in prior P4 verification by providing end-to-end data-plane verification that includes not only the P4 control block but also parsers, deparsers, and configurable engines. It extends the Verifiable P4 framework with formal parser/deparser specifications and modular models for configurable engines, enabling proofs that a switch program plus its configuration implements a given specification. The authors demonstrate the approach on two classic P4 applications (a packet sampler and a stateful firewall) to show how end-to-end correctness can be established by composing proofs across components. The framework emphasizes modularity, portability to other architectures, and a recognition of current axiomatization limitations for some engines, highlighting practical steps toward reliable, scalable switch verification. Overall, the paper presents a principled, architecture-aware methodology for validating entire switch behavior, from input packets to final output, under formal specifications.

Abstract

To prove the functional correctness of a P4 program running in a programmable network switch or smart NIC, prior works have focused mainly on verifiers for the "control block" (match-action pipeline). But to verify that a switch handles packets according to a desired specification, proving the control block is not enough. We demonstrate a new comprehensive framework for formally specifying and proving the additional components of the switch that handle each packet: P4 parsers and deparsers, as well as non-P4 components such as multicast engines, packet generators, and resubmission paths. These are generally triggered by having the P4 program set header or metadata fields, which prompt other switch components -- fixed-function or configurable -- to execute the corresponding actions. Overall behavior is correct only if the "configurable" components are, indeed, configured properly; and we show how to prove that. We demonstrate our framework by verifying the correctness of packet-stream behavior in two classic P4 applications. Our framework is the first to allow the correctness proof of a P4 program to be composed with the correctness proof for these other switch components to verify that the switch programming as a whole accomplishes a specified behavior.

Comprehensive Verification of Packet Processing

TL;DR

This work addresses the gap in prior P4 verification by providing end-to-end data-plane verification that includes not only the P4 control block but also parsers, deparsers, and configurable engines. It extends the Verifiable P4 framework with formal parser/deparser specifications and modular models for configurable engines, enabling proofs that a switch program plus its configuration implements a given specification. The authors demonstrate the approach on two classic P4 applications (a packet sampler and a stateful firewall) to show how end-to-end correctness can be established by composing proofs across components. The framework emphasizes modularity, portability to other architectures, and a recognition of current axiomatization limitations for some engines, highlighting practical steps toward reliable, scalable switch verification. Overall, the paper presents a principled, architecture-aware methodology for validating entire switch behavior, from input packets to final output, under formal specifications.

Abstract

To prove the functional correctness of a P4 program running in a programmable network switch or smart NIC, prior works have focused mainly on verifiers for the "control block" (match-action pipeline). But to verify that a switch handles packets according to a desired specification, proving the control block is not enough. We demonstrate a new comprehensive framework for formally specifying and proving the additional components of the switch that handle each packet: P4 parsers and deparsers, as well as non-P4 components such as multicast engines, packet generators, and resubmission paths. These are generally triggered by having the P4 program set header or metadata fields, which prompt other switch components -- fixed-function or configurable -- to execute the corresponding actions. Overall behavior is correct only if the "configurable" components are, indeed, configured properly; and we show how to prove that. We demonstrate our framework by verifying the correctness of packet-stream behavior in two classic P4 applications. Our framework is the first to allow the correctness proof of a P4 program to be composed with the correctness proof for these other switch components to verify that the switch programming as a whole accomplishes a specified behavior.
Paper Structure (35 sections, 1 theorem, 22 equations, 4 figures, 1 table)

This paper contains 35 sections, 1 theorem, 22 equations, 4 figures, 1 table.

Key Result

Theorem 1

Figures (4)

  • Figure 1: Packet Paths of the Intel Tofino Native Architecture. Purple boxes (Ingress and Egress) are the two P4 pipelines. Grey boxes (second row) are configurable engines.
  • Figure 2: A Typical Packet Byte Stream Format
  • Figure 3: Packet Replication Engine
  • Figure 4: A Multicast Group Configuration

Theorems & Definitions (1)

  • Theorem 1: Sampler Correct