• Matan Barak's avatar
    IB/core: Change idr objects to use the new schema · fd3c7904
    Matan Barak authored
    This changes only the handlers which deals with idr based objects to
    use the new idr allocation, fetching and destruction schema.
    This patch consists of the following changes:
    (1) Allocation, fetching and destruction is done via idr ops.
    (2) Context initializing and release is done through
        uverbs_initialize_ucontext and uverbs_cleanup_ucontext.
    (3) Ditching the live flag. Mostly, this is pretty straight
        forward. The only place that is a bit trickier is in
        ib_uverbs_open_qp. Commit [1] added code to check whether
        the uobject is already live and initialized. This mostly
        happens because of a race between open_qp and events.
        We delayed assigning the uobject's pointer in order to
        eliminate this race without using the live variable.
    
    [1] commit a040f95d
    	("IB/core: Fix XRC race condition in ib_uverbs_open_qp")
    Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
    Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    fd3c7904
uverbs_std_types.h 3.72 KB