From: Guy Levi <guyle@xxxxxxxxxxxx> Methods sometimes need to get a flexible set of idrs and not a strict set as can be achieved today by the conventional idr attribute. This is an idrs-array-like behavior. Since this may be popular used, we add a new IDRS_ARRAY attribute to the generic uverbs ioctl layer. This attribute is embedded in methods, like any other attributes we currently have. We align the user-space code with the respected changes in the kernel. Signed-off-by: Guy Levi <guyle@xxxxxxxxxxxx> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> --- libibverbs/cmd_ioctl.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libibverbs/cmd_ioctl.h b/libibverbs/cmd_ioctl.h index d58d890..df3dc41 100644 --- a/libibverbs/cmd_ioctl.h +++ b/libibverbs/cmd_ioctl.h @@ -394,4 +394,13 @@ fill_attr_in_enum(struct ibv_command_buffer *cmd, uint16_t attr_id, return attr; } +/* Send attributes of kernel type UVERBS_ATTR_TYPE_IDRS_ARRAY */ +static inline struct ib_uverbs_attr * +fill_attr_in_objs_arr(struct ibv_command_buffer *cmd, uint16_t attr_id, + const uint32_t *idrs_arr, size_t nelems) +{ + return fill_attr_in(cmd, attr_id, idrs_arr, + _array_len(sizeof(*idrs_arr), nelems)); +} + #endif -- 1.8.3.1