gone with the spring cleanup..
Subsystems (3)
Hi Scott, Jiri
So, following the spring cleanup, my builder (which turns to have pretty old GCC 4.4.6) isn't functional anymore w.r.t net-next... I checked on different station and it works on GCC 4.9.2.
I would love us to get this fixed, please let me know if you need more info, below is the build verbose command line build error.
Few more pieces of info, changing -std=gnu89to -std=gnu99didn't help. Also the command line where it does work (4.9.2) uses -std=gnu89
Or.
gcc -Wp,-MD,net/switchdev/.switchdev.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.4.6/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -Os -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(switchdev)" -D"KBUILD_MODNAME=KBUILD_STR(switchdev)" -c -o net/switchdev/.tmp_switchdev.o net/switchdev/switchdev.c net/switchdev/switchdev.c: In function 'switchdev_fib_ipv4_add':net/switchdev/switchdev.c:646: error: unknown field 'ipv4_fib' specified in initializernet/switchdev/switchdev.c:646: warning: braces around scalar initializernet/switchdev/switchdev.c:646: warning: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:647: error: field name not in record or union initializernet/switchdev/switchdev.c:647: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:648: error: field name not in record or union initializernet/switchdev/switchdev.c:648: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:648: warning: excess elements in scalar initializernet/switchdev/switchdev.c:648: warning: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:649: error: field name not in record or union initializernet/switchdev/switchdev.c:649: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:649: warning: excess elements in scalar initializernet/switchdev/switchdev.c:649: warning: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:650: error: field name not in record or union initializernet/switchdev/switchdev.c:650: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:650: warning: excess elements in scalar initializernet/switchdev/switchdev.c:650: warning: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:651: error: field name not in record or union initializernet/switchdev/switchdev.c:651: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:651: warning: excess elements in scalar initializernet/switchdev/switchdev.c:651: warning: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:652: error: field name not in record or union initializernet/switchdev/switchdev.c:652: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:652: warning: excess elements in scalar initializernet/switchdev/switchdev.c:652: warning: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:653: error: field name not in record or union initializernet/switchdev/switchdev.c:653: error: (near initialization for 'fib_obj.trans')net/switchdev/switchdev.c:653: warning: excess elements in scalar initializernet/switchdev/switchdev.c:653: warning: (near initialization for 'fib_obj.trans')
Jiri Pirko
maintainerQuoted 11 lines · Wed, May 13, 2015 at 11:12:45AM CEST, [email protected] wrote:
Hi Scott, Jiri
So, following the spring cleanup, my builder (which turns to have pretty old GCC 4.4.6) isn't functional anymore w.r.t net-next... I checked on different station and it works on GCC 4.9.2.
I would love us to get this fixed, please let me know if you need more info, below is the build verbose command line build error.
Few more pieces of info, changing -std=gnu89to -std=gnu99didn't help. Also the command line where it does work (4.9.2) uses -std=gnu89
Looks like the problem might be in named structures which suppose to be anonymous. Would you try following patch:
include/net/switchdev.h +2 -2
@@ -53,12 +53,12 @@ struct switchdev_obj {enum switchdev_obj_id id;enum switchdev_trans trans;union { -struct switchdev_obj_vlan {/* PORT_VLAN */ +struct {/* PORT_VLAN */ u16 flags;u16 vid_start;u16 vid_end; } vlan; -struct switchdev_obj_ipv4_fib {/* IPV4_FIB */ +struct {/* IPV4_FIB */ u32 dst;int dst_len;struct fib_info *fi;
Jiri Pirko
maintainerQuoted 7 lines · Wed, May 13, 2015 at 12:38:12PM CEST, [email protected] wrote:
Quoted 6 lines · Wed, May 13, 2015 at 11:12:45AM CEST, [email protected] wrote:
Hi Scott, Jiri
So, following the spring cleanup, my builder (which turns to have pretty old GCC 4.4.6) isn't functional anymore w.r.t net-next... I checked on different station and it works on GCC 4.9.2.
Quoted 8 lines
Quoted 5 lines
I would love us to get this fixed, please let me know if you need more info, below is the build verbose command line build error.
Few more pieces of info, changing -std=gnu89to -std=gnu99didn't help. Also the command line where it does work (4.9.2) uses -std=gnu89
Looks like the problem might be in named structures which suppose to be anonymous. Would you try following patch:
oh, switchdev_obj_vlan and switchdev_obj_ipv4_fib is used in rocker.. So better:
include/net/switchdev.h +18 -14
@@ -49,24 +49,28 @@ enum switchdev_obj_id { SWITCHDEV_OBJ_IPV4_FIB, }; +struct switchdev_obj_vlan { +u16 flags; +u16 vid_start; +u16 vid_end; +}; + +struct switchdev_obj_ipv4_fib { +u32 dst; +int dst_len; +struct fib_info *fi; +u8 tos; +u8 type; +u32 nlflags; +u32 tb_id; +}; +struct switchdev_obj {enum switchdev_obj_id id;enum switchdev_trans trans;union { -struct switchdev_obj_vlan {/* PORT_VLAN */ -u16 flags; -u16 vid_start; -u16 vid_end; - } vlan; -struct switchdev_obj_ipv4_fib {/* IPV4_FIB */ -u32 dst; -int dst_len; -struct fib_info *fi; -u8 tos; -u8 type; -u32 nlflags; -u32 tb_id; - } ipv4_fib; +struct switchdev_obj_vlan vlan; +struct switchdev_obj_ipv4_fib ipv4_fib; }; };
Quoted 4 lines · Jiri Pirko
Quoted 2 lines
Looks like the problem might be in named structures which suppose to be
Quoted 1 line
anonymous. Would you try following patch:
oh,
switchdev_obj_vlanandswitchdev_obj_ipv4_fibis used in rocker.. So better:
nope, fails.. if I remove the union (it is struct switchdev_obj has strict vlan and ipv4_fib fields) it works. Seems there's some problem also with anonymous unions.
Quoted 48 lines
include/net/switchdev.h +18
-14@@ -49,24 +49,28 @@ enum switchdev_obj_id { SWITCHDEV_OBJ_IPV4_FIB, }; +struct switchdev_obj_vlan { +u16 flags; +u16 vid_start; +u16 vid_end; +}; + +struct switchdev_obj_ipv4_fib { +u32 dst; +int dst_len; +struct fib_info *fi; +u8 tos; +u8 type; +u32 nlflags; +u32 tb_id; +}; +struct switchdev_obj {enum switchdev_obj_id id;enum switchdev_trans trans;union { -struct switchdev_obj_vlan {/* PORT_VLAN */ -u16 flags; -u16 vid_start; -u16 vid_end; - } vlan; -struct switchdev_obj_ipv4_fib {/* IPV4_FIB */ -u32 dst; -int dst_len; -struct fib_info *fi; -u8 tos; -u8 type; -u32 nlflags; -u32 tb_id; - } ipv4_fib; +struct switchdev_obj_vlan vlan; +struct switchdev_obj_ipv4_fib ipv4_fib; }; };
Quoted 7 lines · Or Gerlitz
Quoted 4 lines · Jiri Pirko
Quoted 2 lines
Looks like the problem might be in named structures which suppose to be
Quoted 1 line
anonymous. Would you try following patch:
oh,
switchdev_obj_vlanandswitchdev_obj_ipv4_fibis used in rocker.. So better:nope, fails.. if I remove the union (it is struct
switchdev_objhas strict vlan andipv4_fibfields) it works. Seems there's some problem also with anonymous unions.
Yes, we once had such an issue here btw: