mbox series

[RFC,v2,0/2] IB device in-kernel API support indication

Message ID 1546766583-27979-1-git-send-email-galpress@amazon.com (mailing list archive)
Headers show
Series IB device in-kernel API support indication | expand

Message

Gal Pressman Jan. 6, 2019, 9:23 a.m. UTC
Hello all,
This RFC marks drivers that do not implement all mandatory verbs for kverbs as
non-kverbs providers though a flag in the IB device.
Currently, ULPs add the device and fail when trying to make actual use.
Instead, in case of missing verbs, mark the device as a non-kverbs provider and
allow clients to exit gracefully.

This also removes the need for stubs implementation of unsupported verbs, which
will no longer fail the device registration but mark the device as non-kverbs
provider.

A 'no_kverbs_req' flag is added to the ib_clients, which is off by default
except for uverbs. This is added in order to identify the uverbs module when
registering a new device/client.
It can also be done using name comparison but the flag seems better to me.

Patch #1 adds the flag to the IB device and marks devices that do not implement
all needed kverbs functions.
Patch #2 removes all stub functions from usnic.

This RFC is introduced following the discussion over the EFA driver [1], which
initially does not provide in-kernel API support.

[1] https://patchwork.kernel.org/cover/10711629/

Changelog:
v1->v2
* Make core code mark devices instead of having each driver advertise its support
* Prevent clients device addition in core code instead of inside the clients

Thanks,
Gal


Gal Pressman (2):
  RDMA: Add indication for in kernel API support to IB device
  IB/usnic: Remove stub functions

 drivers/infiniband/core/device.c             | 12 ++++---
 drivers/infiniband/core/uverbs_main.c        |  1 +
 drivers/infiniband/hw/usnic/usnic_ib_main.c  |  7 ----
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 53 ----------------------------
 drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 15 --------
 include/rdma/ib_verbs.h                      |  5 +++
 6 files changed, 14 insertions(+), 79 deletions(-)