Re: [PATCH v3] IB/uverbs: Add UVERBS_ATTR_FLAGS_IN to the specs language

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

 



On Thu, Jul 26, 2018 at 04:37:14PM -0600, Jason Gunthorpe wrote:
> This clearly indicates that the input is a bitwise combination of values
> in an enum, and identifies which enum contains the definition of the bits.
> 
> Special accessors are provided that handle the mandatory validation of the
> allowed bits and enforce the correct type for bitwise flags.
> 
> If we had introduced this at the start then the kabi would have uniformly
> used u64 data to pass flags, however today there is a mixture of u64 and
> u32 flags. All places are converted to accept both sizes and the accessor
> fixes it. This allows all existing flags to grow to u64 in future without
> any hassle.
> 
> Finally all flags are, by definition, optional. If flags are not passed
> the accessor does not fail, but provides a value of zero.
> 
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/core/uverbs_ioctl.c        | 51 +++++++++++++++++++
>  .../core/uverbs_std_types_counters.c          | 10 ++--
>  drivers/infiniband/core/uverbs_std_types_cq.c | 13 +++--
>  drivers/infiniband/core/uverbs_std_types_mr.c | 10 ++--
>  drivers/infiniband/hw/mlx5/devx.c             | 16 +++---
>  drivers/infiniband/hw/mlx5/main.c             | 16 +++---
>  include/rdma/uverbs_ioctl.h                   | 33 ++++++++++++
>  7 files changed, 119 insertions(+), 30 deletions(-)

Applied to for-next

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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