From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, Nitin Saxena <nsaxena16@gmail.com>
Subject: Re: [PATCH] node: fix C++ compatibility errors (option 2)
Date: Wed, 02 Jul 2025 12:00:35 +0200 [thread overview]
Message-ID: <9169126.6MygDL6H9D@thomas> (raw)
In-Reply-To: <CAG6-93xWTK=mWb2Y2jjQgJAFjAE83vMUUexmP=GX1BN4s0NvFA@mail.gmail.com>
01/07/2025 16:48, Nitin Saxena:
> On Mon, Jun 30, 2025 at 4:27 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > C++ does not allow zero-sized unions - they end up being of size 1-byte,
> > which leads to C/C++ compatibility issues, flagged by the compiler.
> >
> > lib/node/rte_node_mbuf_dynfield.h:78:2: error: union has size 0 in C,
> > size 1 in C++ [-Werror,-Wextern-c-compat]
> > 78 | union {
> > | ^
> > 1 error generated.
> >
> > Fix the error by omitting the persistent_data field when it is
> > zero-sized, since it's unusable. Any app using the field must already
> > specify a size for the persistent data.
> >
> > Fixes: 746e8736da70 ("node: add global mbuf dynfield")
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Acked-by: Nitin Saxena <nsaxena@marvell.com>
Applied, thanks.
prev parent reply other threads:[~2025-07-02 10:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 10:50 Bruce Richardson
2025-07-01 13:04 ` Thomas Monjalon
2025-07-01 14:48 ` Nitin Saxena
2025-07-02 10:00 ` Thomas Monjalon [this message]
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=9169126.6MygDL6H9D@thomas \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=nsaxena16@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).