Re: [PATCH rdma-core 2/4] verbs: Expose a new accessor to be used with enum values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 12, 2018 at 07:04:07PM +0300, Yishai Hadas wrote:
> From: Mark Bloch <markb@xxxxxxxxxxxx>
>
> When the kernel expects to get an enum const value,
> use fill_attr_const_in().
>
> The enum value is passed as uint64 value.
>
> Signed-off-by: Mark Bloch <markb@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 3a61f59..f856b74 100644
> --- a/libibverbs/cmd_ioctl.h
> +++ b/libibverbs/cmd_ioctl.h
> @@ -296,6 +296,9 @@ fill_attr_in_uint64(struct ibv_command_buffer *cmd, uint16_t attr_id,
>  	return attr;
>  }
>
> +#define fill_attr_const_in(cmd, attr_id, _data)				\
						^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
					Let's try to avoid extra space padding

> +	fill_attr_in_uint64(cmd, attr_id, _data)
> +
>  static inline struct ib_uverbs_attr *
>  fill_attr_in_uint32(struct ibv_command_buffer *cmd, uint16_t attr_id,
>  		    uint32_t data)
> --
> 1.8.3.1
>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux