lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250520102751.512d0cf5@kmaincent-XPS-13-7390>
Date: Tue, 20 May 2025 10:27:51 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
 donald.hunter@...il.com, jacob.e.keller@...el.com, sdf@...ichev.me,
 jstancek@...hat.com
Subject: Re: [PATCH net-next 09/11] tools: ynl: enable codegen for TC

On Fri, 16 May 2025 17:13:16 -0700
Jakub Kicinski <kuba@...nel.org> wrote:

> We are ready to support most of TC. Enable C code gen.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

This patch brings spec build error:
$ make -C tools/net/ynl -j9
...
-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:560:10: error: ‘TCA_CT_HELPER_NAME’ undeclared here (not in a function); did you mean ‘TCA_ACT_BPF_NAME’?
  560 |         [TCA_CT_HELPER_NAME] = { .name = "helper-name", .type = YNL_PT_NUL_STR, },
      |          ^~~~~~~~~~~~~~~~~~
      |          TCA_ACT_BPF_NAME
tc-user.c:560:10: error: array index in initializer not of integer type
tc-user.c:560:10: note: (near initialization for ‘tc_act_ct_attrs_policy’)
tc-user.c:560:32: warning: excess elements in array initializer
  560 |         [TCA_CT_HELPER_NAME] = { .name = "helper-name", .type = YNL_PT_NUL_STR, },
      |                                ^
tc-user.c:560:32: note: (near initialization for ‘tc_act_ct_attrs_policy’)
tc-user.c:561:10: error: ‘TCA_CT_HELPER_FAMILY’ undeclared here (not in a function)
  561 |         [TCA_CT_HELPER_FAMILY] = { .name = "helper-family", .type = YNL_PT_U8, },
      |          ^~~~~~~~~~~~~~~~~~~~
tc-user.c:561:10: error: array index in initializer not of integer type
tc-user.c:561:10: note: (near initialization for ‘tc_act_ct_attrs_policy’)
tc-user.c:561:34: warning: excess elements in array initializer
  561 |         [TCA_CT_HELPER_FAMILY] = { .name = "helper-family", .type = YNL_PT_U8, },
      |                                  ^
tc-user.c:561:34: note: (near initialization for ‘tc_act_ct_attrs_policy’)
tc-user.c:562:10: error: ‘TCA_CT_HELPER_PROTO’ undeclared here (not in a function)
  562 |         [TCA_CT_HELPER_PROTO] = { .name = "helper-proto", .type = YNL_PT_U8, },
      |          ^~~~~~~~~~~~~~~~~~~
tc-user.c:562:10: error: array index in initializer not of integer type
tc-user.c:562:10: note: (near initialization for ‘tc_act_ct_attrs_policy’)
tc-user.c:562:33: warning: excess elements in array initializer
  562 |         [TCA_CT_HELPER_PROTO] = { .name = "helper-proto", .type = YNL_PT_U8, },
      |                                 ^
tc-user.c:562:33: note: (near initialization for ‘tc_act_ct_attrs_policy’)
tc-user.c:637:10: error: ‘TCA_MIRRED_BLOCKID’ undeclared here (not in a function); did you mean ‘TCA_MIRRED_PAD’?
  637 |         [TCA_MIRRED_BLOCKID] = { .name = "blockid", .type = YNL_PT_BINARY,},
      |          ^~~~~~~~~~~~~~~~~~
      |          TCA_MIRRED_PAD
tc-user.c:637:10: error: array index in initializer not of integer type
tc-user.c:637:10: note: (near initialization for ‘tc_act_mirred_attrs_policy’)
tc-user.c:637:32: warning: excess elements in array initializer
  637 |         [TCA_MIRRED_BLOCKID] = { .name = "blockid", .type = YNL_PT_BINARY,},
      |                                ^
tc-user.c:637:32: note: (near initialization for ‘tc_act_mirred_attrs_policy’)
tc-user.c:722:10: error: ‘TCA_SKBEDIT_QUEUE_MAPPING_MAX’ undeclared here (not in a function); did you mean ‘TCA_SKBEDIT_QUEUE_MAPPING’?
  722 |         [TCA_SKBEDIT_QUEUE_MAPPING_MAX] = { .name = "queue-mapping-max", .type = YNL_PT_U16, },
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          TCA_SKBEDIT_QUEUE_MAPPING
tc-user.c:722:10: error: array index in initializer not of integer type
tc-user.c:722:10: note: (near initialization for ‘tc_act_skbedit_attrs_policy’)
tc-user.c:722:43: warning: excess elements in array initializer
  722 |         [TCA_SKBEDIT_QUEUE_MAPPING_MAX] = { .name = "queue-mapping-max", .type = YNL_PT_U16, },
      |                                           ^
tc-user.c:722:43: note: (near initialization for ‘tc_act_skbedit_attrs_policy’)
tc-user.c:758:10: error: ‘TCA_TUNNEL_KEY_NO_FRAG’ undeclared here (not in a function); did you mean ‘TCA_TUNNEL_KEY_NO_CSUM’?
  758 |         [TCA_TUNNEL_KEY_NO_FRAG] = { .name = "no-frag", .type = YNL_PT_FLAG, },
      |          ^~~~~~~~~~~~~~~~~~~~~~
      |          TCA_TUNNEL_KEY_NO_CSUM
tc-user.c:758:10: error: array index in initializer not of integer type
tc-user.c:758:10: note: (near initialization for ‘tc_act_tunnel_key_attrs_policy’)
tc-user.c:758:36: warning: excess elements in array initializer
  758 |         [TCA_TUNNEL_KEY_NO_FRAG] = { .name = "no-frag", .type = YNL_PT_FLAG, },
      |                                    ^
tc-user.c:758:36: note: (near initialization for ‘tc_act_tunnel_key_attrs_policy’)
tc-user.c:1295:10: error: ‘TCA_EXT_WARN_MSG’ undeclared here (not in a function); did you mean ‘TCA_NAT_PARMS’?
 1295 |         [TCA_EXT_WARN_MSG] = { .name = "ext-warn-msg", .type = YNL_PT_NUL_STR, },
      |          ^~~~~~~~~~~~~~~~
      |          TCA_NAT_PARMS
tc-user.c:1295:10: error: array index in initializer not of integer type
tc-user.c:1295:10: note: (near initialization for ‘tc_attrs_policy’)
tc-user.c:1295:30: warning: excess elements in array initializer
 1295 |         [TCA_EXT_WARN_MSG] = { .name = "ext-warn-msg", .type = YNL_PT_NUL_STR, },
      |                              ^
tc-user.c:1295:30: note: (near initialization for ‘tc_attrs_policy’)
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

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ