Skip to content

Feature gap: 'show system buffers' CLI reports BPF map utilization; no userspace equivalent #1380

@psaab

Description

@psaab

Gap

show system buffers reads BPF map fill / utilization from dp.GetMapStats() and prints per-map type / max / used / usage% / warning thresholds plus session counts. After eBPF removal, this command will return either nothing or a degenerate output. The CLI surface needs a userspace-equivalent that reports operator-relevant resource usage (worker queue depths, UMEM frame counts, sharded session table fill, flow cache occupancy, etc.).

#1373 Phase 5 acknowledges this — filing as a tracked dependency for Phase 0 audit and to make the surface concrete.

eBPF implementation (source of truth)

  • pkg/cli/cli_show_system.go:20-65showSystemBuffers() calls c.dp.GetMapStats() and renders per-map utilization, warns at ≥80%, critical at ≥90%
  • pkg/cli/cli_show_system.go:67-...showSystemBuffersDetail() for deep dive
  • pkg/dataplane/maps.goGetMapStats() enumerates BPF map fill counts via BPF_MAP_GET_NEXT_KEY walk

Userspace-dp gap

pkg/dataplane/userspace/manager.go does not override GetMapStats(). It inherits the eBPF method via the embedded dataplane.DataPlane (line 58), which today reads the BPF map pins. With eBPF removed:

  • session table (shared & per-binding), UMEM frame usage, worker queues, flow cache, sharded neighbor table, TX rings have no GetMapStats-compatible surface
  • pkg/cli/cli_show_system.go:36 filters out "Array" / "PerCPUArray" — these are exactly the userspace-side counters that would be relevant

Operators rely on this command to spot near-full session/policy/conntrack maps before they cause drops.

Recommended fix

Either:

  1. Rewrite the CLI handler: in pkg/cli/cli_show_system.go::showSystemBuffers(), branch on dp.Mode(). For userspace mode, query the existing status surface (pkg/dataplane/userspace/protocol.go already exposes per-binding stats, session counts, UMEM frame counts, queue depths, sharded session table fill) and render an equivalent table.
  2. Or remove the command in favor of show system userspace status (already exists) and add a deprecation warning if that's the consensus.

Per the #1373 Phase 5 plan, option 1 keeps operator muscle memory; the column set just changes from BPF maps to userspace resource pools.

Blocker for #1373

Operator-facing visibility regression at Phase 4 (BPF source removal) unless the CLI is rewritten or replaced by then.


Refined contract (added 2026-05-17 after triple-review of #1384 and code review of #1386)

See docs/pr/1373-retire-ebpf-dataplane/plan-1380-userspace-buffers.md for the full implementation contract. New since the original issue body:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions