Skip to content

Commit 9b44d8f

Browse files
authored
Merge pull request #1207 from rleon/update-kernel-headers
Update kernel headers
2 parents 19fa263 + 9c653b8 commit 9b44d8f

8 files changed

+100
-39
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,16 @@ if (NOT HAVE_C_WORKING_MISSING_FIELD_INITIALIZERS)
264264
RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WNO_MISSING_FIELD_INITIALIZERS "-Wno-missing-field-initializers")
265265
endif()
266266

267+
# clang doesn't support variable size GCC extension
268+
RDMA_Check_C_Compiles(HAVE_C_VARIABLE_SIZE "
269+
struct c { int a; int b[]; };
270+
struct foo { struct c c; int b; };
271+
int main(int argc,const char *argv[]) { return 0; }"
272+
)
273+
if (NOT HAVE_C_VARIABLE_SIZE)
274+
RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WNO_VARIABLE_SIZE "-Wno-gnu-variable-sized-type-not-at-end")
275+
endif()
276+
267277
# Check that the compiler supports -fno-strict-aliasing.
268278
# The use of this flag in the source is discouraged
269279
set(NO_STRICT_ALIASING_FLAGS "")

kernel-headers/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ publish_internal_headers(rdma
22
rdma/bnxt_re-abi.h
33
rdma/cxgb4-abi.h
44
rdma/efa-abi.h
5+
rdma/erdma-abi.h
56
rdma/hns-abi.h
67
rdma/ib_user_ioctl_cmds.h
78
rdma/ib_user_ioctl_verbs.h

kernel-headers/rdma/erdma-abi.h

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+
/*
3+
* Copyright (c) 2020-2022, Alibaba Group.
4+
*/
5+
6+
#ifndef __ERDMA_USER_H__
7+
#define __ERDMA_USER_H__
8+
9+
#include <linux/types.h>
10+
11+
#define ERDMA_ABI_VERSION 1
12+
13+
struct erdma_ureq_create_cq {
14+
__aligned_u64 db_record_va;
15+
__aligned_u64 qbuf_va;
16+
__u32 qbuf_len;
17+
__u32 rsvd0;
18+
};
19+
20+
struct erdma_uresp_create_cq {
21+
__u32 cq_id;
22+
__u32 num_cqe;
23+
};
24+
25+
struct erdma_ureq_create_qp {
26+
__aligned_u64 db_record_va;
27+
__aligned_u64 qbuf_va;
28+
__u32 qbuf_len;
29+
__u32 rsvd0;
30+
};
31+
32+
struct erdma_uresp_create_qp {
33+
__u32 qp_id;
34+
__u32 num_sqe;
35+
__u32 num_rqe;
36+
__u32 rq_offset;
37+
};
38+
39+
struct erdma_uresp_alloc_ctx {
40+
__u32 dev_id;
41+
__u32 pad;
42+
__u32 sdb_type;
43+
__u32 sdb_offset;
44+
__aligned_u64 sdb;
45+
__aligned_u64 rdb;
46+
__aligned_u64 cdb;
47+
};
48+
49+
#endif

kernel-headers/rdma/hfi/hfi1_user.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ struct hfi1_sdma_comp_entry {
180180
struct hfi1_status {
181181
__aligned_u64 dev; /* device/hw status bits */
182182
__aligned_u64 port; /* port state and status bits */
183-
char freezemsg[0];
183+
char freezemsg[];
184184
};
185185

186186
enum sdma_req_opcode {

kernel-headers/rdma/ib_user_ioctl_verbs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ enum rdma_driver_id {
250250
RDMA_DRIVER_QIB,
251251
RDMA_DRIVER_EFA,
252252
RDMA_DRIVER_SIW,
253+
RDMA_DRIVER_ERDMA,
253254
};
254255

255256
enum ib_uverbs_gid_type {

kernel-headers/rdma/ib_user_verbs.h

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,18 @@ struct ib_uverbs_ex_cmd_hdr {
158158

159159
struct ib_uverbs_get_context {
160160
__aligned_u64 response;
161-
__aligned_u64 driver_data[0];
161+
__aligned_u64 driver_data[];
162162
};
163163

164164
struct ib_uverbs_get_context_resp {
165165
__u32 async_fd;
166166
__u32 num_comp_vectors;
167-
__aligned_u64 driver_data[0];
167+
__aligned_u64 driver_data[];
168168
};
169169

170170
struct ib_uverbs_query_device {
171171
__aligned_u64 response;
172-
__aligned_u64 driver_data[0];
172+
__aligned_u64 driver_data[];
173173
};
174174

175175
struct ib_uverbs_query_device_resp {
@@ -278,7 +278,7 @@ struct ib_uverbs_query_port {
278278
__aligned_u64 response;
279279
__u8 port_num;
280280
__u8 reserved[7];
281-
__aligned_u64 driver_data[0];
281+
__aligned_u64 driver_data[];
282282
};
283283

284284
struct ib_uverbs_query_port_resp {
@@ -308,12 +308,12 @@ struct ib_uverbs_query_port_resp {
308308

309309
struct ib_uverbs_alloc_pd {
310310
__aligned_u64 response;
311-
__aligned_u64 driver_data[0];
311+
__aligned_u64 driver_data[];
312312
};
313313

314314
struct ib_uverbs_alloc_pd_resp {
315315
__u32 pd_handle;
316-
__u32 driver_data[0];
316+
__u32 driver_data[];
317317
};
318318

319319
struct ib_uverbs_dealloc_pd {
@@ -324,12 +324,12 @@ struct ib_uverbs_open_xrcd {
324324
__aligned_u64 response;
325325
__u32 fd;
326326
__u32 oflags;
327-
__aligned_u64 driver_data[0];
327+
__aligned_u64 driver_data[];
328328
};
329329

330330
struct ib_uverbs_open_xrcd_resp {
331331
__u32 xrcd_handle;
332-
__u32 driver_data[0];
332+
__u32 driver_data[];
333333
};
334334

335335
struct ib_uverbs_close_xrcd {
@@ -343,14 +343,14 @@ struct ib_uverbs_reg_mr {
343343
__aligned_u64 hca_va;
344344
__u32 pd_handle;
345345
__u32 access_flags;
346-
__aligned_u64 driver_data[0];
346+
__aligned_u64 driver_data[];
347347
};
348348

349349
struct ib_uverbs_reg_mr_resp {
350350
__u32 mr_handle;
351351
__u32 lkey;
352352
__u32 rkey;
353-
__u32 driver_data[0];
353+
__u32 driver_data[];
354354
};
355355

356356
struct ib_uverbs_rereg_mr {
@@ -362,13 +362,13 @@ struct ib_uverbs_rereg_mr {
362362
__aligned_u64 hca_va;
363363
__u32 pd_handle;
364364
__u32 access_flags;
365-
__aligned_u64 driver_data[0];
365+
__aligned_u64 driver_data[];
366366
};
367367

368368
struct ib_uverbs_rereg_mr_resp {
369369
__u32 lkey;
370370
__u32 rkey;
371-
__aligned_u64 driver_data[0];
371+
__aligned_u64 driver_data[];
372372
};
373373

374374
struct ib_uverbs_dereg_mr {
@@ -380,13 +380,13 @@ struct ib_uverbs_alloc_mw {
380380
__u32 pd_handle;
381381
__u8 mw_type;
382382
__u8 reserved[3];
383-
__aligned_u64 driver_data[0];
383+
__aligned_u64 driver_data[];
384384
};
385385

386386
struct ib_uverbs_alloc_mw_resp {
387387
__u32 mw_handle;
388388
__u32 rkey;
389-
__aligned_u64 driver_data[0];
389+
__aligned_u64 driver_data[];
390390
};
391391

392392
struct ib_uverbs_dealloc_mw {
@@ -408,7 +408,7 @@ struct ib_uverbs_create_cq {
408408
__u32 comp_vector;
409409
__s32 comp_channel;
410410
__u32 reserved;
411-
__aligned_u64 driver_data[0];
411+
__aligned_u64 driver_data[];
412412
};
413413

414414
enum ib_uverbs_ex_create_cq_flags {
@@ -442,13 +442,13 @@ struct ib_uverbs_resize_cq {
442442
__aligned_u64 response;
443443
__u32 cq_handle;
444444
__u32 cqe;
445-
__aligned_u64 driver_data[0];
445+
__aligned_u64 driver_data[];
446446
};
447447

448448
struct ib_uverbs_resize_cq_resp {
449449
__u32 cqe;
450450
__u32 reserved;
451-
__aligned_u64 driver_data[0];
451+
__aligned_u64 driver_data[];
452452
};
453453

454454
struct ib_uverbs_poll_cq {
@@ -492,7 +492,7 @@ struct ib_uverbs_wc {
492492
struct ib_uverbs_poll_cq_resp {
493493
__u32 count;
494494
__u32 reserved;
495-
struct ib_uverbs_wc wc[0];
495+
struct ib_uverbs_wc wc[];
496496
};
497497

498498
struct ib_uverbs_req_notify_cq {
@@ -585,7 +585,7 @@ struct ib_uverbs_create_qp {
585585
__u8 qp_type;
586586
__u8 is_srq;
587587
__u8 reserved;
588-
__aligned_u64 driver_data[0];
588+
__aligned_u64 driver_data[];
589589
};
590590

591591
enum ib_uverbs_create_qp_mask {
@@ -624,7 +624,7 @@ struct ib_uverbs_open_qp {
624624
__u32 qpn;
625625
__u8 qp_type;
626626
__u8 reserved[7];
627-
__aligned_u64 driver_data[0];
627+
__aligned_u64 driver_data[];
628628
};
629629

630630
/* also used for open response */
@@ -669,7 +669,7 @@ struct ib_uverbs_query_qp {
669669
__aligned_u64 response;
670670
__u32 qp_handle;
671671
__u32 attr_mask;
672-
__aligned_u64 driver_data[0];
672+
__aligned_u64 driver_data[];
673673
};
674674

675675
struct ib_uverbs_query_qp_resp {
@@ -703,7 +703,7 @@ struct ib_uverbs_query_qp_resp {
703703
__u8 alt_timeout;
704704
__u8 sq_sig_all;
705705
__u8 reserved[5];
706-
__aligned_u64 driver_data[0];
706+
__aligned_u64 driver_data[];
707707
};
708708

709709
struct ib_uverbs_modify_qp {
@@ -824,7 +824,7 @@ struct ib_uverbs_post_send {
824824
__u32 wr_count;
825825
__u32 sge_count;
826826
__u32 wqe_size;
827-
struct ib_uverbs_send_wr send_wr[0];
827+
struct ib_uverbs_send_wr send_wr[];
828828
};
829829

830830
struct ib_uverbs_post_send_resp {
@@ -843,7 +843,7 @@ struct ib_uverbs_post_recv {
843843
__u32 wr_count;
844844
__u32 sge_count;
845845
__u32 wqe_size;
846-
struct ib_uverbs_recv_wr recv_wr[0];
846+
struct ib_uverbs_recv_wr recv_wr[];
847847
};
848848

849849
struct ib_uverbs_post_recv_resp {
@@ -856,7 +856,7 @@ struct ib_uverbs_post_srq_recv {
856856
__u32 wr_count;
857857
__u32 sge_count;
858858
__u32 wqe_size;
859-
struct ib_uverbs_recv_wr recv[0];
859+
struct ib_uverbs_recv_wr recv[];
860860
};
861861

862862
struct ib_uverbs_post_srq_recv_resp {
@@ -869,12 +869,12 @@ struct ib_uverbs_create_ah {
869869
__u32 pd_handle;
870870
__u32 reserved;
871871
struct ib_uverbs_ah_attr attr;
872-
__aligned_u64 driver_data[0];
872+
__aligned_u64 driver_data[];
873873
};
874874

875875
struct ib_uverbs_create_ah_resp {
876876
__u32 ah_handle;
877-
__u32 driver_data[0];
877+
__u32 driver_data[];
878878
};
879879

880880
struct ib_uverbs_destroy_ah {
@@ -886,15 +886,15 @@ struct ib_uverbs_attach_mcast {
886886
__u32 qp_handle;
887887
__u16 mlid;
888888
__u16 reserved;
889-
__aligned_u64 driver_data[0];
889+
__aligned_u64 driver_data[];
890890
};
891891

892892
struct ib_uverbs_detach_mcast {
893893
__u8 gid[16];
894894
__u32 qp_handle;
895895
__u16 mlid;
896896
__u16 reserved;
897-
__aligned_u64 driver_data[0];
897+
__aligned_u64 driver_data[];
898898
};
899899

900900
struct ib_uverbs_flow_spec_hdr {
@@ -1135,7 +1135,7 @@ struct ib_uverbs_flow_attr {
11351135
* struct ib_flow_spec_xxx
11361136
* struct ib_flow_spec_yyy
11371137
*/
1138-
struct ib_uverbs_flow_spec_hdr flow_specs[0];
1138+
struct ib_uverbs_flow_spec_hdr flow_specs[];
11391139
};
11401140

11411141
struct ib_uverbs_create_flow {
@@ -1161,7 +1161,7 @@ struct ib_uverbs_create_srq {
11611161
__u32 max_wr;
11621162
__u32 max_sge;
11631163
__u32 srq_limit;
1164-
__aligned_u64 driver_data[0];
1164+
__aligned_u64 driver_data[];
11651165
};
11661166

11671167
struct ib_uverbs_create_xsrq {
@@ -1175,30 +1175,30 @@ struct ib_uverbs_create_xsrq {
11751175
__u32 max_num_tags;
11761176
__u32 xrcd_handle;
11771177
__u32 cq_handle;
1178-
__aligned_u64 driver_data[0];
1178+
__aligned_u64 driver_data[];
11791179
};
11801180

11811181
struct ib_uverbs_create_srq_resp {
11821182
__u32 srq_handle;
11831183
__u32 max_wr;
11841184
__u32 max_sge;
11851185
__u32 srqn;
1186-
__u32 driver_data[0];
1186+
__u32 driver_data[];
11871187
};
11881188

11891189
struct ib_uverbs_modify_srq {
11901190
__u32 srq_handle;
11911191
__u32 attr_mask;
11921192
__u32 max_wr;
11931193
__u32 srq_limit;
1194-
__aligned_u64 driver_data[0];
1194+
__aligned_u64 driver_data[];
11951195
};
11961196

11971197
struct ib_uverbs_query_srq {
11981198
__aligned_u64 response;
11991199
__u32 srq_handle;
12001200
__u32 reserved;
1201-
__aligned_u64 driver_data[0];
1201+
__aligned_u64 driver_data[];
12021202
};
12031203

12041204
struct ib_uverbs_query_srq_resp {
@@ -1269,7 +1269,7 @@ struct ib_uverbs_ex_create_rwq_ind_table {
12691269
* wq_handle1
12701270
* wq_handle2
12711271
*/
1272-
__u32 wq_handles[0];
1272+
__u32 wq_handles[];
12731273
};
12741274

12751275
struct ib_uverbs_ex_create_rwq_ind_table_resp {

0 commit comments

Comments
 (0)