From: Moni Shoua <monis@xxxxxxxxxxxx> Add fill_attr_in_ptr_array() to store array of elements in a command buffer. Signed-off-by: Moni Shoua <monis@xxxxxxxxxxxx> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> --- libibverbs/cmd_ioctl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libibverbs/cmd_ioctl.h b/libibverbs/cmd_ioctl.h index df3dc41..5587b86 100644 --- a/libibverbs/cmd_ioctl.h +++ b/libibverbs/cmd_ioctl.h @@ -376,6 +376,9 @@ static inline size_t _array_len(size_t size, size_t nelems) #define fill_attr_out_ptr_array(cmd, attr_id, ptr, nelems) \ fill_attr_out(cmd, attr_id, ptr, _array_len(sizeof(*ptr), nelems)) +#define fill_attr_in_ptr_array(cmd, attr_id, ptr, nelems) \ + fill_attr_in(cmd, attr_id, ptr, _array_len(sizeof(*ptr), nelems)) + static inline size_t __check_divide(size_t val, unsigned int div) { assert(val % div == 0); -- 1.8.3.1