[PATCH v2 01/11] build: define __counted_by as empty on unsupported compilers

Maxime Coquelin maxime.coquelin at redhat.com
Tue Sep 29 09:26:37 CEST 2026


On Tue, Sep 29, 2026 at 1:42 AM Stephen Hemminger <
stephen at networkplumber.org> wrote:

> On Mon, 28 Sep 2026 15:29:03 +0200
> Eugenio Pérez <eperezma at redhat.com> wrote:
>
> > __counted_by is a GCC 14 / Clang 18 extension used in imported kernel
> > uapi headers. Older compilers reject it with an error. Define it as an
> > empty function-like macro when the compiler does not support it.
> >
> > Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
> > ---
>
> NAK
>
> Missing Signed-Of-By and the right way to handle counted_by is to
> introduce and a new macro in rte_common.h (aka __rte_counted_by).
> There are lots of places in DPDK that could use it.
>
> If the problem is in vhost, then get it from stddef.h
>
>
To me the solution is to import stddef.h, I have not tried but it is quite
small and self-contained.

Regards,
Maxime
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20260929/b122ac57/attachment.htm>


More information about the dev mailing list