Table of Contents
Fetching ...

P4-PSFP: P4-Based Per-Stream Filtering and Policing for Time-Sensitive Networking

Fabian Ihle, Steffen Lindner, Michael Menth

TL;DR

A P4-based implementation of Per-Stream Filtering and Policing on a 100 Gb/s per port hardware switch is presented and credit-based and time-based policing and synchronization capabilities are demonstrated to validate the functionality and effectiveness of P4-PSFP.

Abstract

Time-Sensitive Networking (TSN) extends Ethernet to enable real-time communication. In TSN, bounded latency and zero congestion-based packet loss are achieved through mechanisms such as the Credit-Based Shaper (CBS) for bandwidth shaping and the Time-Aware Shaper (TAS) for traffic scheduling. Generally, TSN requires streams to be explicitly admitted before being transmitted. To ensure that admitted traffic conforms with the traffic descriptors indicated for admission control, Per-Stream Filtering and Policing (PSFP) has been defined. For credit-based metering, well-known token bucket policers are applied. However, time-based metering requires time-dependent switch behavior and time synchronization with sub-microsecond precision. While TSN-capable switches support various TSN traffic shaping mechanisms, a full implementation of PSFP is still not available. To bridge this gap, we present a P4-based implementation of PSFP on a 100 Gb/s per port hardware switch. We explain the most interesting aspects of the PSFP implementation whose code is available on GitHub. We demonstrate credit-based and time-based policing and synchronization capabilities to validate the functionality and effectiveness of P4-PSFP. The implementation scales up to 35840 streams depending on the stream identification method. P4-PSFP can be used in practice as long as appropriate TSN switches lack this function. Moreover, its implementation may be helpful for other P4-based hardware implementations that require time synchronization.

P4-PSFP: P4-Based Per-Stream Filtering and Policing for Time-Sensitive Networking

TL;DR

A P4-based implementation of Per-Stream Filtering and Policing on a 100 Gb/s per port hardware switch is presented and credit-based and time-based policing and synchronization capabilities are demonstrated to validate the functionality and effectiveness of P4-PSFP.

Abstract

Time-Sensitive Networking (TSN) extends Ethernet to enable real-time communication. In TSN, bounded latency and zero congestion-based packet loss are achieved through mechanisms such as the Credit-Based Shaper (CBS) for bandwidth shaping and the Time-Aware Shaper (TAS) for traffic scheduling. Generally, TSN requires streams to be explicitly admitted before being transmitted. To ensure that admitted traffic conforms with the traffic descriptors indicated for admission control, Per-Stream Filtering and Policing (PSFP) has been defined. For credit-based metering, well-known token bucket policers are applied. However, time-based metering requires time-dependent switch behavior and time synchronization with sub-microsecond precision. While TSN-capable switches support various TSN traffic shaping mechanisms, a full implementation of PSFP is still not available. To bridge this gap, we present a P4-based implementation of PSFP on a 100 Gb/s per port hardware switch. We explain the most interesting aspects of the PSFP implementation whose code is available on GitHub. We demonstrate credit-based and time-based policing and synchronization capabilities to validate the functionality and effectiveness of P4-PSFP. The implementation scales up to 35840 streams depending on the stream identification method. P4-PSFP can be used in practice as long as appropriate TSN switches lack this function. Moreover, its implementation may be helpful for other P4-based hardware implementations that require time synchronization.
Paper Structure (46 sections, 7 equations, 18 figures, 2 tables)

This paper contains 46 sections, 7 equations, 18 figures, 2 tables.

Figures (18)

  • Figure 1: The three components stream filter, stream gate, and flow meter compose the PSFP mechanism. They are processed in sequential orderqci.
  • Figure 2: Example hyperperiod consisting of three stream GCL with periods $p_1 = 2$, $p_2 = 3$, and $p_3 = 4$, and time slices in the open (o) or closed (c) state. Each stream GCL is extended to the least common multiple of $h=12$ to form a hyperperiod.
  • Figure 3: A two-rate, three-color marking token bucket policer according to RFC 2698rfc2698.
  • Figure 4: Illustrated MATkn. The header and metadata fields of a frame form a composite key to match entries in the table. In the data plane, either the assigned action is executed on a match, or the default action is executed on a miss. The table entries are populated by the control plane.
  • Figure 5: Illustrated TNA pipelinetna. It consists of several P4 programmable blocks in the ingress and egress and some fixed-function blocks, such as the packet generator.
  • ...and 13 more figures