|WARNING| eal: prefix lcore role values
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Oct 13 08:30:04 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/171097
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-13
# DPDK Patch Review
## Summary
This patch renames enum values in `rte_lcore_role_t` to add the `RTE_LCORE_` prefix, maintaining backward compatibility via macro aliases. The changes are mechanical and consistent throughout the codebase.
## ERRORS
None identified.
## WARNINGS
### 1. Missing release notes update
**File:** (none - release notes not updated)
**Issue:** This patch makes a significant API change (adding prefixed enum values and deprecating the old unprefixed names via compatibility macros) but does not update the release notes to document this change.
Per AGENTS.md: "Changes to existing API require release notes." While the old names remain available as aliases, this is a notable API evolution that applications should be aware of, especially since the old names are now deprecated in favor of the new ones.
**Suggested fix:** Add an entry to `doc/guides/rel_notes/release_26_11.rst` (or the appropriate current release notes file) documenting:
- The new properly-prefixed enum values
- That old names remain available as compatibility macros
- Recommendation to migrate to new names in new code
### 2. Missing deprecation notice for old macro aliases
**File:** `lib/eal/include/rte_lcore.h`
**Lines:** 40-43
**Issue:** The backward compatibility macros are added without any deprecation marking or documentation indicating they are provided only for compatibility and new code should use the prefixed versions.
```c
/* Old lcore role aliases for backward compatibility. */
#define ROLE_RTE RTE_LCORE_ROLE_RTE
#define ROLE_OFF RTE_LCORE_ROLE_OFF
#define ROLE_SERVICE RTE_LCORE_ROLE_SERVICE
#define ROLE_NON_EAL RTE_LCORE_ROLE_NON_EAL
```
**Suggested fix:** Either add `RTE_DEPRECATED` to these macros or add a comment explicitly stating they are deprecated and will be removed in a future release:
```c
/* Old lcore role aliases for backward compatibility.
* These are deprecated; new code should use RTE_LCORE_ROLE_* values.
*/
#define ROLE_RTE RTE_LCORE_ROLE_RTE
#define ROLE_OFF RTE_LCORE_ROLE_OFF
#define ROLE_SERVICE RTE_LCORE_ROLE_SERVICE
#define ROLE_NON_EAL RTE_LCORE_ROLE_NON_EAL
```
## INFO
### Code Quality Observations
**Positive aspects:**
1. The renaming is systematic and complete across all files
2. Backward compatibility is preserved through macro aliases
3. All internal DPDK code is updated to use the new names
4. The naming now follows DPDK conventions (all enum values have the `RTE_LCORE_` prefix)
5. Documentation comments are updated where the enum values are referenced
**Consistency:**
The patch correctly updates all occurrences:
- Test code: `app/test/test_lcores.c`, `app/test/test_mempool.c`
- Driver code: `drivers/net/softnic/rte_eth_softnic_thread.c`
- EAL implementation: `lib/eal/common/eal_common_lcore.c`, `lib/eal/common/eal_common_options.c`, `lib/eal/common/rte_service.c`
- Public header: `lib/eal/include/rte_lcore.h`
- Library code: `lib/graph/graph.c`
All comparisons and assignments have been updated, including those within conditionals, function arguments, and switch statements.
Review-Result: WARNING
More information about the test-report
mailing list