|SUCCESS| eal: enforce internal API check with Clang

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Oct 15 03:00:18 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-15

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

**Pre-existing: Inconsistent diagnostic message**

The patch reorders existing code blocks but does not address an inconsistency between the error messages for GCC and Clang implementations of `__rte_internal`.

- GCC version (line 54): `"Symbol is not public ABI"`
- Clang version (line 42): `"Internal API not allowed"`

While both convey the intent, having identical messages across toolchains would be clearer for users. This is pre-existing and not introduced by this patch.

**Code structure observation**

The patch correctly inverts the `#if`/`#elif` order to prioritize `diagnose_if` over `error` attribute when both are available on Clang. The logic is sound:

1. Clang with `diagnose_if` (strongest checking)
2. GCC or older Clang with `error` attribute (fallback)
3. No check available (fallback to no-op)

The section placement (`section(".text.internal")`) and attribute combinations remain unchanged in both blocks, maintaining consistency.

**Commit message clarity**

The commit message clearly explains the problem: the `error` attribute check happens post-optimization, allowing some internal API calls to slip through undetected when optimized away. The `diagnose_if` approach catches these earlier. The rationale for the reordering is well-documented.

Review-Result: CLEAN


More information about the test-report mailing list