AI & Computingpreprint2026-09-24

P4-Days: Programmable Data-Plane Execution in a Multicore Discrete-Event Network Simulator

Open access0 citations

Abstract

Packet-level simulation of P4-programmable networks is expensive because a software P4 pipeline must be interpreted for every packet at every programmable hop. Existing integration through P4sim provides realistic BMv2 execution inside ns-3, but ns-3 uses a sequential event core. Days is a recent multicore discrete-event network simulator whose lightweight packet representation intentionally carries no serialized protocol bytes. Integrating BMv2 with Days therefore requires more than a direct wrapper. BMv2 requires packet bytes and persistent per-switch state, whereas Days must retain control of time, routing, links, queueing, and parallel execution. We present P4-Days, an extension that embeds one BMv2 instance in each programmable Days switch. P4-Days lazily synthesizes protocol headers, executes P4 ingress and egress on opposite sides of the Days scheduler, and isolates mutable BMv2 state at the switch level. Across 16 cross-simulator scenarios, P4-Days matches ns-3+p4sim exactly in every scenario in which no output port is persistently saturated, a condition that is computable from the routing before a run. Where saturation makes the outcome depend on input arbitration, which neither simulator models, the two diverge; unmodified Days and P4-Days remain byte-identical in exactly those scenarios. P4-Days is 1.82-1.97x faster with stock BMv2 and 1.94-2.52x faster with logging-free BMv2. On a 1,280-switch fat-tree, P4-Days reaches a 5.19x speedup on 16 workers, whereas unmodified Days reaches 3.96x. These results show that programmable packet processing can be integrated without destroying Days' actor-level parallelism.

// Source

View paper (DOI)Open access versionOpenAlexZenodo (CERN European Organization for Nuclear Research)Published 2026-09-24

Authors: Taejoon Lee

Institutions: University of Ottawa