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.
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 statisticsrte_eth_xstats_get— extended statisticsThese APIs can only be called from the
dataplaneprocess, since theDPDK EALis initialized there. Thecontrolplanecannot access them directly viaFFI.Proposed Solution:
The
dataplaneshould periodically collect NIC statistics and write them toshared memory. Thecontrolplanewill then read and expose these metrics, similar to howdevice/pipeline/modulecounters are currently handled.