• Matan Barak's avatar
    IB/uverbs: Add enum attribute type to ioctl() interface · 494c5580
    Matan Barak authored
    Methods sometimes need to get one attribute out of a group of
    pre-defined attributes. This is an enum-like behavior. Since
    this is a common requirement, we add a new ENUM attribute to the
    generic uverbs ioctl() layer. This attribute is embedded in methods,
    like any other attributes we currently have. ENUM attributes point to
    an array of standard UVERBS_ATTR_PTR_IN. The user-space encodes the
    enum's attribute id in the id field and the internal PTR_IN attr id in
    the enum_data.elem_id field. This ENUM attribute could be shared by
    several attributes and it can get UVERBS_ATTR_SPEC_F_MANDATORY flag,
    stating this attribute must be supported by the kernel, like any other
    attribute.
    Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
    Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    494c5580
rdma_user_ioctl_cmds.h 2.78 KB