]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Add a macro to define a type with no kernel known size
authorMatan Barak <matanb@mellanox.com>
Sun, 17 Jun 2018 09:59:53 +0000 (12:59 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 19 Jun 2018 16:53:02 +0000 (10:53 -0600)
commita1365569eb1ea450762d4a0c77bc4347376e5ce9
treec14d68a71a2c971245b66fd6f8599b1ce04242cd
parent5903cdd8d4412cc9de1647a4258242bd8bf2e740
IB/uverbs: Add a macro to define a type with no kernel known size

Sometimes the uverbs uAPI  doesn't really care about the structure it gets
from user-space. All it wants to do is to allocate enough space and send
it to the hardware/provider driver. Adding a UVERBS_ATTR_MIN_SIZE that
could be used for this scenarios. We use USHRT_MAX as the kernel known
size to bypass any zero validations.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_std_types.c
include/rdma/uverbs_ioctl.h