On Mon, 12 Jan 2026 14:23:51 -0500
Kishore Padmanabha <[email protected]> wrote:

> The stats collection was not aggregrating the stats for rings greater
> than RTE_ETHDEV_QUEUE_STAT_CNTRS  if the application did not increase
> the stats counters but supports more than the limit.
> Added checks to increment the aggregated stats from queues
> greater than the limit.
> 
> Bugzilla ID: 1836
> Cc: [email protected]
> Fixes: 57d5e5bc86e4 ("net/bnxt: add statistics")
> 
> Signed-off-by: Kishore Padmanabha <[email protected]>
> ---

Did AI code review on this (yes I am lazy)..

DPDK Patch Review: net/bnxt: fix the stat collection
Summary

This patch fixes statistics aggregation for Rx/Tx queues beyond the 
RTE_ETHDEV_QUEUE_STAT_CNTRS limit. The approach is to iterate over all rings 
but pass NULL for per-queue stats when the index exceeds the limit, ensuring 
aggregate counters still accumulate properly.
Commit Message Issues

ERROR — Tag Order Violation

The tags are in wrong order. Per AGENTS.md, the correct order is:

Bugzilla ID:
Fixes:
Cc:
<blank line>
Signed-off-by:

Current patch has:

Bugzilla ID: 1836
Cc: [email protected]       ← wrong position
Fixes: 57d5e5bc86e4 (...)

Signed-off-by: ...

Cc: must come after Fixes:, not before.

WARNING — Typo in Commit Body

Line 105: "aggregrating" should be "aggregating"

WARNING — Double Space

Line 106: There's a double space before "if" (CNTRS  if)

INFO — Suggested Rewrite

net/bnxt: fix the stat collection

Stats collection was not aggregating stats for rings greater
than RTE_ETHDEV_QUEUE_STAT_CNTRS when the application did not
increase the stats counters but supports more queues than the
limit. Add checks to increment aggregated stats from queues
greater than the limit.

Bugzilla ID: 1836
Fixes: 57d5e5bc86e4 ("net/bnxt: add statistics")
Cc: [email protected]

Signed-off-by: Kishore Padmanabha <[email protected]>

Code Review

Style Compliance ✓

    Line lengths within 100 characters
    Proper use of DPDK atomics (rte_atomic_load_explicit, 
rte_memory_order_relaxed)
    Consistent indentation with surrounding code
    No forbidden tokens detected

Technical Observations

The fix correctly:

    Extends iteration to cover all rings (bp->rx_cp_nr_rings / 
bp->tx_cp_nr_rings)
    Uses conditional i < num_q_stats ? qstats : NULL to suppress per-queue 
stats for indices beyond the limit while still accumulating aggregate stats

INFO — Implicit NULL Handling Assumption

The patch assumes bnxt_fill_rte_eth_stats() and bnxt_fill_rte_eth_stats_ext() 
safely handle NULL for the qstats parameter. This is likely intentional and 
correct, but worth confirming in review. A brief comment in the commit message 
like "The fill functions already handle NULL qstats for aggregate-only 
collection" would strengthen the patch.
Verdict
Category        Status
Subject line    ✓ Pass
Tag format      ERROR — wrong order
Body content    WARNING — typo, double space
Signed-off-by   ✓ Present
Code style      ✓ Pass
Technical correctness   ✓ Looks correct (pending NULL-handling verification)

Recommendation: Request v2 with corrected tag order and typo fix.

Reply via email to