]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA: Add indication for in kernel API support to IB device
authorGal Pressman <galpress@amazon.com>
Tue, 22 Jan 2019 08:08:22 +0000 (10:08 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 31 Jan 2019 03:32:25 +0000 (20:32 -0700)
commit6780c4fa9d6e091b2f206ac429a40e2e8d2e45f3
treed53b9ef08b0a56df944b780549bd81674afdb6d3
parent459cc69fa4c17caf21de596693d8a07170820a58
RDMA: Add indication for in kernel API support to IB device

Drivers that do not provide kernel verbs support should not be used by ib
kernel clients at all.

In case a device does not implement all mandatory verbs for kverbs usage
mark it as a non kverbs provider and prevent its usage for all clients
except for uverbs.

The device is marked as a non kverbs provider using the 'kverbs_provider'
flag which should only be set by the core code.  The clients can choose
whether kverbs are requested for its usage using the 'no_kverbs_req' flag
which is currently set for uverbs only.

This patch allows drivers to remove mandatory verbs stubs and simply set
the callbacks to NULL. The IB device will be registered as a non-kverbs
provider. Note that verbs that are required for the device registration
process must be implemented.

Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c
drivers/infiniband/core/uverbs_main.c
include/rdma/ib_verbs.h