[PATCH v2 3/3] eal: enforce internal API check with Clang 14

David Marchand david.marchand at redhat.com
Thu Oct 15 13:40:02 CEST 2026


On Thu, 15 Oct 2026 at 13:29, David Marchand <david.marchand at redhat.com> wrote:
>
> From: Thomas Monjalon <thomas at monjalon.net>
>
> The __rte_internal macro is intended to prevent calls
> to internal API functions unless ALLOW_INTERNAL_API is defined.
> Unfortunately the check misses some calls to internal API
> when built with GCC or Clang.
> Clang can be better to diagnose such cases.
>
> Clang 14 and later support the error attribute
> and therefore select it instead of diagnose_if for __rte_internal.
> Unlike diagnose_if, the error attribute only rejects
> internal API calls that remain after optimization.
> Internal API calls can therefore go easily unnoticed,
> making internal API checks less strict with recent Clang.
>
> Prefer diagnose_if when available to keep strong Clang diagnostics.
> Retain the error attribute as a fallback for GCC.
>
> Fixes: 4ab63cd60ceb ("eal: fix internal ABI tag with clang")
> Cc: stable at dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>

Just a note about CI.
It seems we have some trouble with the ovsrobot but this series passes
GHA in my repo:
https://github.com/david-marchand/dpdk/actions/runs/38725255308


-- 
David Marchand



More information about the dev mailing list