Skip to content

graph: add rte_node xstat collection support#540

Merged
christophefontaine merged 1 commit intoDPDK:mainfrom
rjarry:node-xstats
Mar 10, 2026
Merged

graph: add rte_node xstat collection support#540
christophefontaine merged 1 commit intoDPDK:mainfrom
rjarry:node-xstats

Conversation

@rjarry
Copy link
Collaborator

@rjarry rjarry commented Mar 9, 2026

DPDK graph nodes can declare custom counters (xstats) via the rte_node_register.xstats field. Wire them into grout's stats infrastructure so they appear alongside regular node stats.

The datapath callback tracks xstat deltas using prev_xstats stored in node_stats, following the same pattern as packets/batches/cycles. Xstat descriptions are resolved from the node registration info in the control plane only, when dumping stats via worker_dump_stats(). Each xstat appears as a separate gr_stat entry named "node_name.xstat_desc".

At startup, enforce that no node declares more xstats than GR_MAX_NODE_XSTATS.

Summary by CodeRabbit

  • New Features
    • Added extended statistics tracking for graph nodes, enabling more granular performance monitoring and metrics collection at the node level.

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: afe8ec42-f56e-4295-8241-e72dffe2fc11

📥 Commits

Reviewing files that changed from the base of the PR and between 851bee2 and db5fbb5.

📒 Files selected for processing (5)
  • modules/infra/control/gr_worker.h
  • modules/infra/control/graph.c
  • modules/infra/control/worker.c
  • modules/infra/control/worker_test.c
  • modules/infra/datapath/main_loop.c

📝 Walkthrough

Walkthrough

This change introduces extended statistics (xstats) tracking to the node statistics system. A new maximum capacity constant limits xstats per node, and the node stats structure is extended with fields to store xstats values and their previous snapshots. Validation is added to reject nodes exceeding the xstats capacity. The stats collection and aggregation logic is expanded to compute per-xstat deltas, construct individual stat entries for each xstat, and aggregate them alongside base node statistics. A stub helper function is introduced to resolve node metadata during stats processing.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

DPDK graph nodes can declare custom counters (xstats) via the
rte_node_register.xstats field. Wire them into grout's stats
infrastructure so they appear alongside regular node stats.

The datapath callback tracks xstat deltas using prev_xstats stored in
node_stats, following the same pattern as packets/batches/cycles. Xstat
descriptions are resolved from the node registration info in the control
plane only, when dumping stats via worker_dump_stats(). Each xstat
appears as a separate gr_stat entry named "node_name.xstat_desc".

At startup, enforce that no node declares more xstats than
GR_MAX_NODE_XSTATS.

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Reviewed-by: Christophe Fontaine <cfontain@redhat.com>
@christophefontaine christophefontaine merged commit 48b2416 into DPDK:main Mar 10, 2026
6 checks passed
@rjarry rjarry deleted the node-xstats branch March 10, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants