aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ibta_vol1_c12.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-01-16 13:00:37 -0400
committerJason Gunthorpe <jgg@mellanox.com>2020-01-25 15:11:37 -0400
commit13e0af1801f2e74639b4eadb69ed1fad2cf802f7 (patch)
tree4920fedab727ced4a264f41efb5affce052e37ec /include/rdma/ibta_vol1_c12.h
parentRDMA/cm: Use IBA functions for complex structure members (diff)
downloadlinux-dev-13e0af1801f2e74639b4eadb69ed1fad2cf802f7.tar.xz
linux-dev-13e0af1801f2e74639b4eadb69ed1fad2cf802f7.zip
RDMA/cm: Remove CM message structs
All accesses now use the new IBA acessor scheme, so delete the structs entirely and generate the structures from the schema file. Link: https://lore.kernel.org/r/20200116170037.30109-8-jgg@ziepe.ca Tested-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--include/rdma/ibta_vol1_c12.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/rdma/ibta_vol1_c12.h b/include/rdma/ibta_vol1_c12.h
index 916db5c27dc5..269904425d3f 100644
--- a/include/rdma/ibta_vol1_c12.h
+++ b/include/rdma/ibta_vol1_c12.h
@@ -29,7 +29,12 @@
IBA_FIELD_MLOC(field_struct, \
(byte_offset + sizeof(struct ib_mad_hdr)), width, type)
#define CM_STRUCT(field_struct, total_len) \
- static_assert((total_len) % 32 == 0);
+ field_struct \
+ { \
+ struct ib_mad_hdr hdr; \
+ u32 _data[(total_len) / 32 + \
+ BUILD_BUG_ON_ZERO((total_len) % 32 != 0)]; \
+ }
/* Table 106 REQ Message Contents */
#define CM_REQ_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_req_msg, 0, 32)