arXiv:2609.39978cs.DCSep 2026

Manuscript Offprint

arXiv:2609.39978

LatencyLab: A DPDK-Based P4 Pipeline Latency Measurement Framework for FPGA SmartNICs

Pavani Kuppili, Zhaoyang Han, Yicheng Qian, Suranga Handagala, Michael Zink, Miriam Leeser, Robert Ricci

P. Kuppili*, Z. Han†, Y. Qian†, S. Handagala‡, M. Zink†, M. Leeser‡, R. Ricci*

*University of Utah †University of Massachusetts Amherst ‡Northeastern University

Abstract—P4-programmable FPGA SmartNICs place packet processing directly on the wire, but open FPGA P4 toolflows do not expose timestamping at the pipeline boundary, so the latency a P4 program adds on the target FPGA is rarely measured. This paper presents LatencyLab, a DPDK-based measurement framework for FPGA P4 pipeline latency that needs neither PHC/PTP support on the datapath nor clock synchronization. The FPGA's two ports share a network segment, so the switch multicasts a copy of each probe packet to both: one copy passes through the VitisNetP4 pipeline, the other through a matched bypass path. A kernel-bypass DPDK receiver busy-polls both ports and timestamps every packet with the CPU timestamp counter (TSC) as it is retrieved from the NIC's receive circular buffer. The arrival-time difference of the two copies isolates the pipeline latency after calibration against a null bitstream carrying the same traffic; transmit time cancel in the subtraction. We evaluate four VitisNetP4 programs on an AMD Alveo U280, probing each with a 20,000-packet trace measured ten times per session over five independent sessions, all TSC-timestamped and reflected for hardware timestamping. The measured latency distributions are tight and reproducible: 99% of packets fall within 20 ns of the median, session medians repeating within 1–2 ns (FiveTuple 107/137 ns, Forward 149 ns, RemoveHeader 177 ns, Checksum 364 ns at 250 MHz). Two independent checks agree with the framework: a kernel-free reflector returns every probe pair to a ConnectX-5 NIC whose adapter clock reproduces the measured distributions within a few nanoseconds, quantile by quantile, and every measured packet falls 18 to 22 clock cycles below the vendor's worst-case latency bound. The framework also reveals behavior that averages hide: FiveTuple does not have a single latency; at each bring-up it settles into one of two values 31 ns apart, an effect traced to the clock of its lookup memory.

Index Terms—Data Plane Development Kit (DPDK), differential measurement, FPGA SmartNICs, hardware timestamping, latency measurement, Open-NIC-Shell, P4, VitisNetP4

I. INTRODUCTION

Modern datacenters offload packet processing from hosts into programmable network interface cards (NICs) [1], and FPGA SmartNICs programmed in P4 bring that programmability all the way to the wire [2]–[4]. On the open side of this ecosystem, Open-NIC-Shell [5] with AMD VitisNetP4 [6] turns an Alveo U280 into a P4-programmable 100GbE NIC through a standard toolflow [7], and a growing class of applications now runs computation inside that pipeline: sketch-based traffic monitoring maintains count-min counters in the data plane at 100 Gbps [8], and stateful network functions built from P4 and high-level synthesis (HLS) extract and aggregate flow information at line rate [9]. Both systems run on the platform measured in this paper, and both were validated for throughput, but the per-packet latency these pipelines add — the other half of a real-time processing budget — could not be measured with existing tools.

That number is rarely measured, because the measurement points do not exist. Direct one-way timing needs timestamps at the pipeline boundary and a synchronized clock, typically a disciplined PTP Hardware Clock (PHC) [10]. Datacenter switches and commodity NICs (cNICs) provide both [11], [12]. Open FPGA P4 datapaths provide neither. Previous studies highlight this gap through the compensatory structures they had to construct around it: OP4T needed a custom timestamping overlay because P4-to-FPGA toolflows expose no timestamping primitive at the pipeline boundary [13], and P4STA inserted a separate stamper FPGA into the path [14]. Passive FPGA measurement falls back to free-running local counters that no host clock can read [15], and NanoPU reached nanosecond timing only through custom CPU-NIC integration unavailable on off-the-shelf FPGA SmartNICs [16]. Timing signals are generally unavailable inside FPGA P4 data planes [17]–[19], and the platforms that do expose PHCs do so through proprietary stacks [20], [21] or without open P4 support [22].

The other alternative is to timestamp packets at the destination host, but existing measurement literature cautions against doing so. MoonGen measures latency only with NIC hardware timestamps because CPU-clock host stamps carry PCIe and OS-scheduling variance [23]. Where Has My Time Gone [24] and KV-Direct [25] show that host and PCIe interactions can outweigh the device latency under study. P4STA [14] and OSNT [26] exist because software timestamping cannot deliver reliable nanosecond accuracy. Our preliminary measurements on this U280/Open-NIC-Shell platform, reported in II-D, agree on both counts: return paths that traverse the receiver host bury the pipeline latency under PCIe and kernel effects, which are orders of magnitude larger (Sec. II-D), and kernel receive timestamps carry quantization artifacts of tens of nanoseconds, the same scale as the quantity being measured.

This paper presents LatencyLab, a DPDK-based framework that measures the latency distribution of a P4 program on an FPGA-based SmartNIC with packet-level resolution, using only the open toolflow and commodity hardware. Let Lp4L_{p4} denote the transit latency of the VitisNetP4 pipeline. LatencyLab estimates Lp4L_{p4} differentially. The FPGA's two ports sit on the same network segment, so the switch multicasts a copy of each probe packet to both; one copy is processed by the P4 pipeline while the other crosses a matched bypass path. A kernel-free DPDK receiver busy-polls both ports and timestamps each packet with the CPU timestamp counter (TSC) at the NIC's receive circular buffer, so the per-probe arrival-time difference contains Lp4L_{p4} plus a constant path asymmetry. The transmit time and shared network path cancel in the subtraction, and no clocks on different devices need synchronization. The remaining asymmetry is measured using a null bitstream — the plain shell with no P4 pipeline on either path — and subtracted from the differential (Sec. III-E).

Because LatencyLab uses host TSC timestamps rather than NIC hardware timestamps, we verify it against the reference the literature does trust, NIC hardware receive timestamping [23], [26]: every probe pair is reflected, without entering a kernel network stack, to a cNIC that timestamps arrivals in hardware, and its distributions are compared with LatencyLab's. We also check every estimate against the vendor's worst-case latency model [27]. Both agree with the framework (Sec. V-A). The verification is needed once. A deployed LatencyLab requires no PHC, no PTP, and no hardware-timestamping NIC, so it applies where such support is missing.

The contributions of this paper are:

• LatencyLab, a DPDK-based differential framework for FPGA P4 pipeline latency requiring no datapath timing support (Secs. III, IV).

• Characterization of the latency distributions of four VitisNetP4 programs — reproducible to 1–2 ns across independent hardware bring-ups (Sec. V).

• Verification of the framework against an independent NIC hardware clock and the vendor worst-case model (Sec. V-A).

  • A case study enabled by LatencyLab’s packet-level resolution: FiveTuple exhibits two observed session-level modes approximately 31 ns apart, consistent with its separately clocked content-addressable memory (CAM) (Sec. V-B).

References (29)