|SUCCESS| eal: enforce internal API check with Clang

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Oct 14 23:02:10 CEST 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-14

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

**Compilation attributes ordering change - verify behavior**

The patch reverses the order of two preprocessor branches that select the implementation of `__rte_internal`:
- Old: Try `__has_attribute(error)` first (GCC path), then `__has_attribute(diagnose_if)` (Clang path)
- New: Try `__has_attribute(diagnose_if)` first (Clang path), then `__has_attribute(error)` (GCC path)

The commit message explains this is intentional: Clang 14+ supports both attributes, and `diagnose_if` provides stricter checking (diagnoses at compile time) while `error` only diagnoses after optimization (can miss calls). The new ordering prefers the stricter `diagnose_if` when both are available.

This is a correctness improvement, not a bug. The patch correctly prioritizes the more robust checking mechanism for Clang while retaining GCC support.

**Lines 48-55**: The reordered GCC fallback block is identical to the original lines 35-42, just moved later in the conditional chain. No functional change to the GCC path.

**Lines 38-45**: The Clang block (formerly lines 44-51) is also unchanged internally, only its position in the conditional chain moved earlier.

The logic is sound: both compilers will still get an appropriate implementation, but Clang now gets the stronger diagnostic.

Review-Result: CLEAN


More information about the test-report mailing list