Re: [PATCH v2 1/2][next] UAPI: ethtool: Use __struct_group() in struct ethtool_link_settings

From: Gustavo A. R. Silva
Date: Mon Dec 09 2024 - 16:40:02 EST




On 09/12/24 15:14, Christopher Ferris wrote:
Yes, when compiling Android, we have a C++ file that includes the pkt_cls.h
directly to get access to some of the structures from that file. It
currently gets the "types cannot be declared in an anonymous union" error
due to the TAG part of the __struct_group usage not being empty in that
file.

(sigh) this should be reverted:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9c60712d71ff07197b2982899b9db28ed548ded

--
Gustavo


Christopher

On Mon, Dec 9, 2024 at 1:10 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:

On Mon, 9 Dec 2024 12:59:40 -0800 Christopher Ferris wrote:
It looks like the way this was fixed in the ethtool.h uapi header was to
revert the usage of __struct_group. Should something similar happen for
pkt_cls.h? Or would it be easier to simply remove the usage of the TAG in
the _struct_group macro?

Just to state it explicitly - are you running into a compilation issue
with existing user space after updating pkt_cls.h?