DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, <dev@dpdk.org>
Cc: <stable@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH] eal: enforce internal API check with Clang
Date: Thu, 15 Oct 2026 10:54:16 +0200	[thread overview]
Message-ID: <79bf9b9d-9113-4049-a321-7d8a7b57dac5@intel.com> (raw)
In-Reply-To: <20261014201627.571496-1-thomas@monjalon.net>

On 10/14/2026 10:16 PM, Thomas Monjalon wrote:
> 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@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

  reply	other threads:[~2026-10-15  8:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 20:16 [PATCH] eal: enforce internal API check with Clang Thomas Monjalon
2026-10-15  8:54 ` Burakov, Anatoly [this message]
2026-10-15 10:57 ` David Marchand
2026-10-15 11:29 ` [PATCH v2 1/3] buildtools/chkincs: relax checks on driver headers David Marchand
2026-10-15 11:29   ` [PATCH v2 2/3] eal: simplify internal/experimental tags definitions David Marchand
2026-10-15 11:29   ` [PATCH v2 3/3] eal: enforce internal API check with Clang 14 David Marchand
2026-10-15 11:31     ` Burakov, Anatoly
2026-10-15 11:38       ` David Marchand
2026-10-15 11:40     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79bf9b9d-9113-4049-a321-7d8a7b57dac5@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox