Skip to content

feat: add NIC-level statistics collection and exposure #673

@saushew

Description

@saushew

Problem / Goal:
Currently, yanet exposes device-level counters (rx/tx packets/bytes) that reflect traffic passing through the logical yanet device. However, NIC-level statistics are not collected. This includes hardware-level errors, driver-level drops, missed packets, and other low-level metrics.

DPDK provides two APIs for retrieving NIC statistics:

  • rte_eth_stats_get — basic statistics
  • rte_eth_xstats_get — extended statistics

These APIs can only be called from the dataplane process, since the DPDK EAL is initialized there. The controlplane cannot access them directly via FFI.

Proposed Solution:
The dataplane should periodically collect NIC statistics and write them to shared memory. The controlplane will then read and expose these metrics, similar to how device/pipeline/module counters are currently handled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions