|WARNING| [v2,9/9] ethdev: remove support for queue stats mapping

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Jul 23 23:21:18 CEST 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/166926

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-07-23

# DPDK Patch Review - series.patch

## PATCH 1/9: net/virtio: remove unused queue stats mapping

**No issues found.**

---

## PATCH 2/9: app/testpmd: remove unused function prototype

**No issues found.**

---

## PATCH 3/9: net/enic: remove unneeded ops initialization

**No issues found.**

---

## PATCH 4/9: net/cnxk: remove queue stats mapping

### Warnings

1. **Missing release notes for API-visible driver change** (Warning)
   The patch removes the `queue_stats_mapping_set` op from `cnxk_eth_dev_ops` and changes the behavior of `cnxk_nix_stats_get()` to enumerate all queues directly instead of using a mapping table. This is a user-visible behavior change (applications that relied on custom queue stat mappings will now see stats for all queues up to `RTE_ETHDEV_QUEUE_STAT_CNTRS`). Release notes should document this.

2. **Variable scope unnecessarily widened** (Warning)
   In `cnxk_stats.c`, the declaration of `i` is moved from inside the loop-initialization to the start of the function, and its type is changed from `int` to `unsigned int`. The guidelines prefer declaring variables at point of use (C99 style). The original `for (i = 0; ...)` style was acceptable; the change to a block-scoped declaration at the top reduces clarity without benefit.

   ```c
   /* Current patch */
   unsigned int i;
   int rc = 0;
   ...
   for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {

   /* Preferred - keep i scoped to the loop */
   int rc = 0;
   ...
   for (unsigned int i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
   ```

---

## PATCH 5/9: net/e1000: remove queue stats mapping

**No issues found.**

---

## PATCH 6/9: net/ixgbe: remove queue stats mapping

**No issues found.**

---

## PATCH 7/9: net/txgbe: remove queue stats mapping

### Warnings

1. **Variable declaration style inconsistency** (Warning)
   In `txgbe_ethdev.c:txgbe_dev_stats_get()`, the patch changes the loop counter declaration:
   
   ```c
   /* Before */
   uint32_t i, j;

   /* After */
   unsigned int i;
   ```

   The change to `unsigned int i;` is fine, but the comment says to prefer declaring at point of use. The original `i` could have been declared in the `for` loop initialization. Consider:

   ```c
   for (unsigned int i = 0; i < TXGBE_MAX_QP; i++) {
   ```

---

## PATCH 8/9: net/sxe2: remove queue stats mapping

**No issues found.**

---

## PATCH 9/9: ethdev: remove support for queue stats mapping

**No issues found.**

---

## Summary

**Errors:** 0  
**Warnings:** 3  
**Info:** 0

The patch series correctly removes the deprecated queue stats mapping feature across all drivers and the ethdev layer. The main issues are minor style points (variable scope) and one missing release note for a driver behavior change in cnxk.


More information about the test-report mailing list