Days
Configuration Settings

Link Layer (L2 / PFC)

Enable and configure the optional PFC pipeline per edge.

Link-layer behavior is configured under [link] and implemented in src/l2/.

link.mode

[link]
mode = "None" # or "Pfc"

Supported values:

  • None (default): build the original L3/L4-only topology (switch + scheduler per edge).
  • Pfc: insert a PFC-capable L2 pipeline on each edge.

Feature gating:

  • mode = "Pfc" requires building with --features l2_pfc.
  • If you set mode = "Pfc" without the feature, Days will fail early.

link.pfc (only when mode = "Pfc")

PFC parameters live under [link.pfc] and are converted into fixed-size arrays of 8 entries (one per 802.1Q priority, 0–7). If a vector is provided, it must have exactly 8 elements.

[link]
mode = "Pfc"

[link.pfc]
xoff = [65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536]
xon = [49152, 49152, 49152, 49152, 49152, 49152, 49152, 49152]
pause_quanta = [65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535]
buffer_capacity = [0, 0, 0, 0, 0, 0, 0, 0]
refresh_interval = 0.0002
drain_interval = 0.000001

Fields and defaults (from Topology::build_pfc_config in src/topos/topo.rs):

  • xoff (bytes, default 64 * 1024 per priority): assert pause when occupancy ≥ XOFF
  • xon (bytes, default 48 * 1024 per priority): send resume when occupancy ≤ XON
  • pause_quanta (default 65535 per priority): pause time encoded in quanta (see below)
  • buffer_capacity (bytes, default 0 per priority): ingress buffer cap (0 = unlimited)
  • refresh_interval (seconds, optional): how often to refresh pause frames while paused
  • drain_interval (seconds, optional): retry delay when downstream cannot accept packets

Pause quanta interpretation:

  • PFC frame pause duration uses pause_quanta * 512 bit-times / link_rate_bps.

On this page