|WARNING| eal/x86: fix LZCNT CPU feature bit
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Fri Aug 28 23:00:45 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/168612
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-08-28
# DPDK Patch Review
## Patch: eal/x86: fix LZCNT CPU feature bit
### Summary
This patch corrects the CPUID bit position for detecting LZCNT (Leading Zero Count) instruction support on x86 processors. The fix changes the bit check from ECX[4] to ECX[5] in the extended CPUID leaf 0x80000001.
---
## Review Findings
### Correctness Issues
**None found.** The change is a simple single-bit correction in a feature table that correctly addresses the stated bug.
---
### Code Style and Quality
**No issues found.** The change:
- Follows existing formatting and style in the file
- Maintains alignment with surrounding entries
- Is minimal and targeted
---
### Documentation and Testing
**Warning: Missing release notes**
This bug fix changes observable behavior (LZCNT feature detection) and should be documented in release notes. Add an entry to the current release notes file under a "Fixed Issues" or similar section describing:
- The incorrect bit position was causing misdetection of LZCNT support
- Applications relying on `rte_cpu_get_flag_enabled(RTE_CPUFLAG_LZCNT)` may see different results after the fix
**Info: Test coverage consideration**
While not required for this fix, consider whether existing CPU feature detection tests in `app/test/test_cpuflags.c` adequately verify the LZCNT flag on processors that support it. This is informational only; adding tests can be a follow-up if desired.
---
### Process Compliance
**All requirements met:**
- [x] Fixes tag present and correctly formatted
- [x] Cc: stable at dpdk.org included (appropriate for this bug fix)
- [x] .mailmap entry added for new contributor
- [x] Minimal, focused change addressing a single issue
- [x] Code compiles independently (single-line constant change)
---
## Conclusion
The patch is technically correct and makes an important fix to CPU feature detection. The only actionable item is adding a release notes entry to document the behavior change.
**Recommendation: Accept with minor documentation addition**
More information about the test-report
mailing list