Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kernel headers #1207

Merged
merged 2 commits into from Aug 21, 2022
Merged

Update kernel headers #1207

merged 2 commits into from Aug 21, 2022

Conversation

rleon
Copy link
Member

@rleon rleon commented Aug 18, 2022

No description provided.

CMakeLists.txt Outdated
@@ -819,6 +829,9 @@ endif()
if (NOT HAVE_C_WORKING_SHADOW)
message(STATUS " -Wshadow does NOT work")
endif()
if (NOT HAVE_C_VARIABLE_SIZE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem quite right.. I think I would just drop this entire statement. The purpose of the summary block at the end is to highlight defects in the environment that might be problematic. Supressing a warning isn't an issue..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

GCC supports variable sized type in any place through extension.

This extension is not implemented in clang, so compilation of rdma-core
with kernel headers after commit 94dfc73e7cf4 ("treewide: uapi: Replace
zero-length arrays with flexible-array members") generates the following
error:

2022-08-18T12:08:02.8170828Z FAILED: providers/hns/CMakeFiles/hns.dir/hns_roce_u.c.o
2022-08-18T12:08:02.8174185Z /usr/bin/clang-13 -DVERBS_DEBUG -D_STATIC_LIBRARY_BUILD_=1 -Iinclude -I/usr/include/libnl3 -I/usr/include/drm -g -O2 -fdebug-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings -Wformat=2 -Wcast-function-type -Wformat-nonliteral -Wdate-time -Wnested-externs -Wshadow -Wstrict-prototypes -Wold-style-definition -Werror -Wredundant-decls -g   -std=gnu11 -MD -MT providers/hns/CMakeFiles/hns.dir/hns_roce_u.c.o -MF providers/hns/CMakeFiles/hns.dir/hns_roce_u.c.o.d -o providers/hns/CMakeFiles/hns.dir/hns_roce_u.c.o   -c ../providers/hns/hns_roce_u.c
2022-08-18T12:08:02.8176362Z In file included from ../providers/hns/hns_roce_u.c:40:
2022-08-18T12:08:02.8177075Z In file included from ../providers/hns/hns_roce_u.h:48:
2022-08-18T12:08:02.8178671Z ../providers/hns/hns_roce_u_abi.h:40:1: error: field 'ibv_cmd' with variable sized type '_ABI_REQ_STRUCT_IB_USER_VERBS_CMD_ALLOC_PD' (aka 'struct ibv_alloc_pd') not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
2022-08-18T12:08:02.8179879Z DECLARE_DRV_CMD(hns_roce_alloc_pd, IB_USER_VERBS_CMD_ALLOC_PD,
2022-08-18T12:08:02.8180461Z ^
2022-08-18T12:08:02.8181315Z include/infiniband/kern-abi.h:141:22: note: expanded from macro 'DECLARE_DRV_CMD'
2022-08-18T12:08:02.8182189Z                 IBV_ABI_REQ(_enum) ibv_cmd;

Link: https://dev.azure.com/ucfconsort/f3b4a7f7-c9a7-467e-8013-95fd10fcc2ac/_apis/build/builds/49164/logs/95
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
To commit 568035b01cfb ("Linux 6.0-rc1").

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
@rleon rleon merged commit 9b44d8f into linux-rdma:master Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants