|SUCCESS| argparse: support range step for corelist parsing

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Oct 16 12:04:53 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/171477

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-16

# DPDK Patch Review

## ERRORS

None identified.

## WARNINGS

None identified.

## INFO

**Test coverage observation (app/test/test_argparse.c:932-958):**

The test cases for reverse range steps verify the behavior correctly, but there's an inconsistency in the assertion messages. Lines 956-957 still reference "reverse range 10-5!" in the assertion messages, but they should reference "reverse range 10-5:2!" to match the actual test case being validated:

```c
TEST_ASSERT(!CPU_ISSET(4, &val_cpuset), "Core 4 should not be set in reverse range 10-5!");
TEST_ASSERT(!CPU_ISSET(11, &val_cpuset), "Core 11 should not be set in reverse range 10-5!");
```

Should be:

```c
TEST_ASSERT(!CPU_ISSET(4, &val_cpuset), "Core 4 should not be set in reverse range 10-5:2!");
TEST_ASSERT(!CPU_ISSET(11, &val_cpuset), "Core 11 should not be set in reverse range 10-5:2!");
```

This doesn't affect correctness but would make test output clearer if the assertions fail.

**Code quality observation (lib/argparse/rte_argparse.c:576-578, 625-640):**

The patch introduces three new local variables at function scope (`is_step`, `step`, `max` moved from loop scope). This is acceptable, but `max` was previously declared inside the loop at line 590 (`int32_t max;`) where it was scoped to each iteration. Moving it to function scope changes its lifetime but doesn't introduce a bug since it's always written before being read. The logic correctly resets all three variables (`min`, `max`, `step`) along with the `is_step` flag at lines 633-636 after processing each core/range.

**Documentation alignment:**

The documentation update in `doc/guides/prog_guide/argparse_lib.rst` correctly describes the new syntax and provides clear examples. The step feature is documented both for forward and reverse ranges, matching the implementation.

Review-Result: CLEAN


More information about the test-report mailing list