|WARNING| [v1,5/5] test: use new lcore role enum names
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Wed Jun 17 17:20:06 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/165599
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-06-17
# DPDK Patch Review
## Overall Assessment
This patch series renames lcore role enum values to follow DPDK naming conventions by adding the `RTE_LCORE_` prefix. The series is well-structured, maintains backward compatibility via macros, and the changes are consistently applied across the codebase.
## Patch 1/5: eal: prefix lcore role enum values
### Warnings
**Enum value naming inconsistency:**
The new enum values use `RTE_LCORE_ROLE_*` but the backward compatibility macros drop the middle `LCORE` part (`ROLE_RTE` vs `RTE_LCORE_ROLE_RTE`). While technically correct, this creates two different naming patterns in the same API surface. Consider documenting this discrepancy in the release notes to help users understand the migration path.
**Documentation update:**
The Doxygen comment update in `rte_lcore_iterate` correctly reflects the new names, but the comment text could be more explicit that the old names are deprecated aliases. Consider adding a note like "The old ROLE_* names are deprecated aliases for backward compatibility."
## Patch 2/5: eal: use new lcore role enum names
### Info
**Consistent application:**
The patch correctly and consistently replaces all occurrences of the old enum names with the new prefixed versions throughout EAL common code. No issues found.
**String representations:**
The `lcore_role_str()` function in `eal_common_lcore.c` updates the switch cases but keeps the string representations as "RTE", "SERVICE", "NON_EAL" (without the full prefix). This is acceptable for display purposes but consider whether "RTE_LCORE_ROLE_RTE" would be clearer in debug output. This is an info-level observation, not an error.
## Patch 3/5: graph: use new lcore role enum names
### Info
**Single-line change:**
The patch correctly updates the single occurrence in the graph library. No issues found.
## Patch 4/5: net/softnic: use new lcore role enum names
### Info
**Driver update:**
The patch correctly updates the softnic driver. No issues found.
## Patch 5/5: test: use new lcore role enum names
### Info
**Test application updates:**
The patch correctly updates test applications. No issues found.
## Cross-Patch Observations
**Complete coverage:**
The series appears to have complete coverage of the enum usage across the codebase (EAL, graph, drivers, tests). The backward compatibility macros ensure no external API break.
**Missing release notes:**
This is an API change (even though backward compatible) that should be documented in the current release notes. Please add an entry to `doc/guides/rel_notes/release_*.rst` in the "API Changes" section noting:
- The enum values have been renamed with `RTE_LCORE_` prefix
- Old names remain as deprecated aliases
- Users should migrate to the new names in new code
**Missing deprecation notice:**
The backward compatibility macros (`ROLE_RTE`, etc.) should ideally be marked as deprecated. Consider adding `__rte_deprecated` or at minimum a comment indicating these are deprecated aliases. Since these are macros, deprecation attributes may not work, but a comment is still valuable:
```c
/* Deprecated: use RTE_LCORE_ROLE_RTE instead */
#define ROLE_RTE RTE_LCORE_ROLE_RTE
```
## Summary
**Errors:** None
**Warnings:**
- Patch 1/5: Consider documenting the naming pattern discrepancy (enum vs macro) in release notes
- All patches: Missing release notes entry for this API change
**Info:**
- Patch 2/5: String representations in debug output keep short form (acceptable)
- All patches: Consider marking backward compatibility macros as deprecated in comments
- All patches: Consider adding a deprecation timeline for removing the old macro aliases in a future release
The patches are technically correct and maintain backward compatibility. The main gaps are in documentation (release notes) and clearly marking the old names as deprecated for future cleanup.
More information about the test-report
mailing list