]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
IB/core: Change completion channel to use the reworked objects schema
authorMatan Barak <matanb@mellanox.com>
Tue, 4 Apr 2017 10:31:47 +0000 (13:31 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 5 Apr 2017 17:28:04 +0000 (13:28 -0400)
commit1e7710f3f6563940bb6bbc94aa8eadfd344a86af
treefcb76beff0bfd2e9c24e7962c5afa9c40fef25d6
parentcf8966b3477d5e6545393bb4499f2051ea554c62
IB/core: Change completion channel to use the reworked objects schema

This patch adds the standard fd based type - completion_channel.
The completion_channel is now prefixed with ib_uobject, similarly
to the rest of the uobjects.
This requires a few changes:
(1) We define a new completion channel fd based object type.
(2) completion_event and async_event are now two different types.
    This means they use different fops.
(3) We release the completion_channel exactly as we release other
    idr based objects.
(4) Since ib_uobjects are already kref-ed, we only add the kref to the
    async event.

A fd object requires filling out several parameters. Its op pointer
should point to uverbs_fd_ops and its size should be at least the
size if ib_uobject. We use a macro to make the type declaration
easier.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/core/uverbs_std_types.c
include/rdma/uverbs_std_types.h
include/rdma/uverbs_types.h