netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	donald.hunter@gmail.com, jacob.e.keller@intel.com,
	sdf@fomichev.me, jstancek@redhat.com
Subject: Re: [PATCH net-next v2 10/12] tools: ynl: enable codegen for TC
Date: Wed, 21 May 2025 13:31:38 -0700	[thread overview]
Message-ID: <20250521133138.0c164028@kernel.org> (raw)
In-Reply-To: <20250520193625.6d6bc18b@kmaincent-XPS-13-7390>

On Tue, 20 May 2025 19:36:25 +0200 Kory Maincent wrote:
> > > Now got this build error:
> > > 
> > > -e 	GEN tc-user.c
> > > -e 	GEN tc-user.h
> > > -e 	GEN_RST tc.rst
> > > -e 	CC tc-user.o
> > > In file included from <command-line>:
> > > ./../../../../include/uapi//linux/pkt_cls.h:250:9: error: expected
> > > specifier-qualifier-list before ‘__struct_group’ 250 |
> > > __struct_group(tc_u32_sel_hdr, hdr, /* no attrs */, |         ^~~~~~~~~~~~~~
> > > tc-user.c: In function ‘tc_u32_attrs_parse’:
> > > tc-user.c:9086:33: warning: comparison is always false due to limited range
> > > of data type [-Wtype-limits] 9086 |                         if (len <
> > > sizeof(struct tc_u32_sel)) |                                 ^
> > > make[1]: *** [Makefile:52: tc-user.o] Error 1    
> > 
> > Odd, are you sure you have the latest headers for Ubuntu 22.04?  
> 
> Indeed I wasn't but after an update I still got the same error.
> More precisely I am on Ubuntu 22.04.5 LTS. linux-headers-5.15.0-140

I tried to fix this but stddef includes compiler_types.h, which is 
a non-uAPI header, apparently this gets stripped during header
installation, but there is no guard around it, so our current hack
of including the header directly doesn't work.

__struct_group() was added in v5.16, and v5.15 stable tree pulled 
it in for v5.15.142, 1.5 years ago. But latest Ubuntu 22.04 package 
with user space headers is linux-libc-dev_5.15.0-25.25_amd64.deb (note
that linux-headers is for kernel headers, eg to built a OOT module),
which AFAICT is 3 years old.

All in all your kernel headers are pretty old. I will try to fix this
separately, but let's not hold up this series :( You can update that
one header in your /usr/include/linux and everything else should work.

  reply	other threads:[~2025-05-21 20:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 16:19 [PATCH net-next v2 00/12] tools: ynl-gen: add support for "inherited" selector and therefore TC Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 01/12] tools: ynl-gen: add makefile deps for neigh Jakub Kicinski
2025-05-20 17:15   ` Kory Maincent
2025-05-20 16:19 ` [PATCH net-next v2 02/12] netlink: specs: tc: remove duplicate nests Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 03/12] netlink: specs: tc: use tc-gact instead of tc-gen as struct name Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 04/12] netlink: specs: tc: add C naming info Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 05/12] netlink: specs: tc: drop the family name prefix from attrs Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 06/12] tools: ynl-gen: support passing selector to a nest Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 07/12] tools: ynl-gen: move fixed header info from RenderInfo to Struct Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 08/12] tools: ynl-gen: support local attrs in _multi_parse Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 09/12] tools: ynl-gen: support weird sub-message formats Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 10/12] tools: ynl: enable codegen for TC Jakub Kicinski
2025-05-20 16:34   ` Kory Maincent
2025-05-20 16:50     ` Jakub Kicinski
2025-05-20 17:36       ` Kory Maincent
2025-05-21 20:31         ` Jakub Kicinski [this message]
2025-05-20 16:19 ` [PATCH net-next v2 11/12] netlink: specs: tc: add qdisc dump to TC spec Jakub Kicinski
2025-05-20 16:19 ` [PATCH net-next v2 12/12] tools: ynl: add a sample for TC Jakub Kicinski
2025-05-21 22:50 ` [PATCH net-next v2 00/12] tools: ynl-gen: add support for "inherited" selector and therefore TC patchwork-bot+netdevbpf

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=20250521133138.0c164028@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jstancek@redhat.com \
    --cc=kory.maincent@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /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).