|SUCCESS| app/test-pmd: add explicit parameter for fixed link speeds

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Nov 3 19:37:59 CET 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-03

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

**File: app/test-pmd/cmdline.c**

**Line 1399: Incorrect `bool` type usage**
```c
parse_and_check_speed_duplex(char *speedstr, char *duplexstr, bool fixed, uint32_t *speed)
```

The `fixed` parameter is declared as `bool`, but DPDK code should use explicit integer types for boolean flags in function parameters when the value is derived from external sources (command parsing). The `data` pointer is cast to boolean on line 1485 (`data != NULL`), which is acceptable for internal logic, but the function signature should use `int` to match the pattern of checking pointer non-NULL status.

However, reviewing the actual usage: the `data` field is set to either `NULL` or the address of the command instance. This pattern (passing command instance address to indicate a flag) is used elsewhere in testpmd cmdline.c and is acceptable.

On further review, the use of `bool` here is appropriate - it's a pure true/false value derived from the data pointer, and the function is static (internal to the file). This is acceptable.

**Correction: No issue here - the `bool` usage is appropriate for this internal function.**

**File: app/test-pmd/cmdline.c**

**Lines 1535-1552: New command instance registration**

The patch adds new command parser instances `cmd_config_speed_all_fixed` and `cmd_config_speed_specific_fixed`. These are registered in the builtin context at lines 14410-14411. The implementation correctly uses the `data` field to pass the "fixed" flag state to the parsing function.

No issues found - the pattern follows existing DPDK testpmd conventions.

**File: doc/guides/rel_notes/release_26_11.rst**

**Lines 344-349: Release notes update**

The release notes entry correctly documents the new feature. The update targets the current release (26.11) as required.

No issues found.

**File: doc/guides/testpmd_app_ug/testpmd_funcs.rst**

**Lines 2170-2177: Documentation update**

The documentation correctly describes the new `fixed` keyword and its behavior. The explanation clarifies that:
- Without `fixed`: autonegotiation enabled
- With `fixed`: autonegotiation disabled
- `auto` speed cannot be combined with `fixed` (enforced by code at lines 1459-1462)

No issues found.

## INFO

None.

---

All findings reviewed. The patch introduces a new optional `fixed` keyword to testpmd's port speed configuration command, allowing users to control whether link autonegotiation is disabled when setting a specific speed. The implementation is correct, follows DPDK coding conventions, and is properly documented.

Review-Result: CLEAN


More information about the test-report mailing list