|SUCCESS| devtools: fix packed attribute check false positive
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Fri Nov 6 01:41:39 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172649
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-06
# Review of DPDK Patch: devtools: fix packed attribute check false positive
## ERRORS
None identified.
## WARNINGS
None identified.
## INFO
**Explanation of the fix:**
The patch corrects a false positive in the `checkpatches.sh` script where `__rte_packed_begin` and `__rte_packed_end` were being counted in git diff hunk headers (lines starting with `@@`), not just in the actual added code. Git includes context in hunk headers that can contain struct names with these markers, causing balanced pairs in the actual code to be flagged as unbalanced.
**Why the fix is correct:**
The change restricts both grep patterns to only match added lines (those starting with `+`), consistent with the packed attribute check above it at line 391. This ensures only actual code additions are counted, not diff metadata.
The regex `^\+.*__rte_packed_begin` correctly matches:
- `^` - start of line
- `\+` - literal plus sign (added line marker)
- `.*` - any characters
- `__rte_packed_begin` - the marker
This is the same pattern style used elsewhere in the script for checking added lines.
**Technical correctness:**
The fix addresses the root cause: hunk headers are metadata and should never contribute to token counts. The parallel change to both `begin_count` and `end_count` ensures symmetry.
Review-Result: CLEAN
More information about the test-report
mailing list