Subject: Re: [PATCH net-next v2 12/13] tools: ynl: generate code for rt-addr and add a sample

From: Jakub Kicinski <[email-masked]>
Date: Fri, 18 Apr 2025 16:29:51 -0700

On Fri, 18 Apr 2025 19:04:31 +0200 Kory Maincent wrote:
> > Reviewed-by: Jacob Keller <[email-masked]>
> > Reviewed-by: Donald Hunter <[email-masked]>
> > Signed-off-by: Jakub Kicinski <[email-masked]>  
> 
> Hello,
> 
> This seems to broke the check-spec:
> 
> $ make -C tools/net/ynl    
> ...
> rt-addr-user.c:62:10: error: ‘IFA_PROTO’ undeclared here (not in a function); did you mean ‘IFA_RTA’?
>    62 |         [IFA_PROTO] = { .name = "proto", .type = YNL_PT_U8, },
>       |          ^~~~~~~~~
>       |          IFA_RTA
> rt-addr-user.c:62:10: error: array index in initializer not of integer type
> rt-addr-user.c:62:10: note: (near initialization for ‘rt_addr_addr_attrs_policy’)
> rt-addr-user.c:62:23: warning: excess elements in array initializer
>    62 |         [IFA_PROTO] = { .name = "proto", .type = YNL_PT_U8, },
>       |                       ^
> rt-addr-user.c:62:23: note: (near initialization for ‘rt_addr_addr_attrs_policy’)
> 
> I found it through git bisect.

Sorry about that. I will send a fix shortly. We needed this first:
https://lore.kernel.org/all/[email-masked]/
without it YNL couldn't include if_addr.h directly.