diff options
author | Jason Gunthorpe | 2018-11-25 20:51:20 +0200 |
---|---|---|
committer | Jason Gunthorpe | 2018-11-26 16:48:07 -0700 |
commit | 07f05f40d956d40f32852a7b3ff109a72d254cf9 (patch) | |
tree | b92baff7535b981cb6590e49a070f5935b30d5cc /include/rdma | |
parent | 3a6532c9af1a7836da2d597f1aaca73cb16c3b97 (diff) |
RDMA/uverbs: Use uverbs_attr_bundle to pass udata for ioctl()
Have the core code initialize the driver_udata if the method has a udata
description. This is done using the same create_udata the handler was
supposed to call.
This makes ioctl consistent with the write and write_ex paths.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/uverbs_ioctl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index 5fa8d63aa838..8fc87079c2b8 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h @@ -79,6 +79,8 @@ struct uverbs_attr_spec { */ u8 alloc_and_copy:1; u8 mandatory:1; + /* True if this is from UVERBS_ATTR_UHW */ + u8 is_udata:1; union { struct { @@ -598,10 +600,12 @@ struct uapi_definition { #define UVERBS_ATTR_UHW() \ UVERBS_ATTR_PTR_IN(UVERBS_ATTR_UHW_IN, \ UVERBS_ATTR_MIN_SIZE(0), \ - UA_OPTIONAL), \ + UA_OPTIONAL, \ + .is_udata = 1), \ UVERBS_ATTR_PTR_OUT(UVERBS_ATTR_UHW_OUT, \ UVERBS_ATTR_MIN_SIZE(0), \ - UA_OPTIONAL) + UA_OPTIONAL, \ + .is_udata = 1) /* ================================================= * Parsing infrastructure |