This is failing with Lunar + 6.5-rc3 (clang-15, llvm-15, gcc-12), as well:
CLNG-BPF [test_maps] test_check_mtu.bpf.o CLNG-BPF [test_maps] test_cls_redirect.bpf.o progs/test_cls_redirect.c:90:2: error: static assertion expression is not an integral constant expression sizeof(flow_ports_t) != ^~~~~~~~~~~~~~~~~~~~~~~ progs/test_cls_redirect.c:91:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression offsetofend(struct bpf_sock_tuple, ipv4.dport) - ^ progs/test_cls_redirect.c:32:3: note: expanded from macro 'offsetofend' (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) ^ /home/ubuntu/mainline-crack/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:86:33: note: expanded from macro 'offsetof' #define offsetof(type, member) ((unsigned long)&((type *)0)->member) ^ progs/test_cls_redirect.c:95:2: error: static assertion expression is not an integral constant expression sizeof(flow_ports_t) != ^~~~~~~~~~~~~~~~~~~~~~~ progs/test_cls_redirect.c:96:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression offsetofend(struct bpf_sock_tuple, ipv6.dport) - ^ progs/test_cls_redirect.c:32:3: note: expanded from macro 'offsetofend' (offsetof(TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) ^ /home/ubuntu/mainline-crack/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:86:33: note: expanded from macro 'offsetof' #define offsetof(type, member) ((unsigned long)&((type *)0)->member) ^ 2 errors generated. make[1]: *** [Makefile:576: /home/ubuntu/mainline-crack/tools/testing/selftests/bpf/test_cls_redirect.bpf.o] Error 1 make[1]: Leaving directory '/home/ubuntu/mainline-crack/tools/testing/selftests/bpf' make: *** [Makefile:169: all] Error 2 make: Leaving directory '/home/ubuntu/mainline-crack/tools/testing/selftests'
ubuntu@autovm4:~/mainline-crack$ git log --oneline a941e05c6 (grafted, HEAD, tag: cod/mainline/v6.5-rc3) debian changelog
This is failing with Lunar + 6.5-rc3 (clang-15, llvm-15, gcc-12), as well:
CLNG-BPF [test_maps] test_check_ mtu.bpf. o redirect. bpf.o cls_redirect. c:90:2: error: static assertion expression is not an integral constant expression
sizeof( flow_ports_ t) !=
^~~~~~ ~~~~~~~ ~~~~~~~ ~~~ cls_redirect. c:91:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
offsetofend( struct bpf_sock_tuple, ipv4.dport) - cls_redirect. c:32:3: note: expanded from macro 'offsetofend'
(offsetof( TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) mainline- crack/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ helpers. h:86:33: note: expanded from macro 'offsetof'
^ cls_redirect. c:95:2: error: static assertion expression is not an integral constant expression
sizeof( flow_ports_ t) !=
^~~~~~ ~~~~~~~ ~~~~~~~ ~~~ cls_redirect. c:96:3: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
offsetofend( struct bpf_sock_tuple, ipv6.dport) - cls_redirect. c:32:3: note: expanded from macro 'offsetofend'
(offsetof( TYPE, MEMBER) + sizeof((((TYPE *)0)->MEMBER))) mainline- crack/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ helpers. h:86:33: note: expanded from macro 'offsetof'
^ mainline- crack/tools/ testing/ selftests/ bpf/test_ cls_redirect. bpf.o] Error 1 ubuntu/ mainline- crack/tools/ testing/ selftests/ bpf' ubuntu/ mainline- crack/tools/ testing/ selftests'
CLNG-BPF [test_maps] test_cls_
progs/test_
progs/test_
^
progs/test_
^
/home/ubuntu/
#define offsetof(type, member) ((unsigned long)&((type *)0)->member)
progs/test_
progs/test_
^
progs/test_
^
/home/ubuntu/
#define offsetof(type, member) ((unsigned long)&((type *)0)->member)
2 errors generated.
make[1]: *** [Makefile:576: /home/ubuntu/
make[1]: Leaving directory '/home/
make: *** [Makefile:169: all] Error 2
make: Leaving directory '/home/
ubuntu@ autovm4: ~/mainline- crack$ git log --oneline v6.5-rc3) debian changelog
a941e05c6 (grafted, HEAD, tag: cod/mainline/