diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-25 20:51:16 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-26 16:48:07 -0700 |
commit | 669dac1e00c50a65cb8ecf08862c3c9dd7a29a98 (patch) | |
tree | 9ff3e1d2931f80dbfd99dc24fe5083b1085a525b /drivers/infiniband/core/uverbs_uapi.c | |
parent | 15a1b4becba886176aa1426604548c34904fd054 (diff) | |
download | linux-669dac1e00c50a65cb8ecf08862c3c9dd7a29a98.tar.bz2 |
RDMA/uverbs: Add structure size info to write commands
We need the structure sizes to compute the location of the udata in the
core code. Annotate the sizes into the new macro language.
This is generated largely by script and checked by comparing against the
similar list in rdma-core.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_uapi.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_uapi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_uapi.c b/drivers/infiniband/core/uverbs_uapi.c index 4738c266ff50..4870c9c16084 100644 --- a/drivers/infiniband/core/uverbs_uapi.c +++ b/drivers/infiniband/core/uverbs_uapi.c @@ -96,6 +96,13 @@ static int uapi_create_write(struct uverbs_api *uapi, BIT_ULL(def->write.command_num)); } + if (!def->write.is_ex && def->func_write) { + method_elm->has_udata = def->write.has_udata; + method_elm->has_resp = def->write.has_resp; + method_elm->req_size = def->write.req_size; + method_elm->resp_size = def->write.resp_size; + } + *cur_method_key = method_key; return 0; } |