diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2018-11-26 08:28:33 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-12-04 13:46:41 -0500 |
commit | 4d7e8cc57429e1874658acbff98d3877c81cd0a4 (patch) | |
tree | c6052f9ab683b76929a5a9dc17287d2692585e89 /include/rdma | |
parent | f33cb7e760dee94dd2b2d7a7f6225578a66a17d5 (diff) | |
download | linux-4d7e8cc57429e1874658acbff98d3877c81cd0a4.tar.bz2 |
IB/core: Introduce UVERBS_IDR_ANY_OBJECT
Introduce the UVERBS_IDR_ANY_OBJECT type to match any IDR object.
Once used, the infrastructure skips checking for the IDR type, it
becomes the driver handler responsibility.
This enables drivers to get in a given method an object from various of
types.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/uverbs_ioctl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index 7f4ace93e502..2f56844fb7da 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h @@ -524,6 +524,12 @@ struct uapi_definition { .u2.objs_arr.max_len = _max_len, \ __VA_ARGS__ } }) +/* + * Only for use with UVERBS_ATTR_IDR, allows any uobject type to be accepted, + * the user must validate the type of the uobject instead. + */ +#define UVERBS_IDR_ANY_OBJECT 0xFFFF + #define UVERBS_ATTR_IDR(_attr_id, _idr_type, _access, ...) \ (&(const struct uverbs_attr_def){ \ .id = _attr_id, \ |