Skip to content

Enrich DEVX support

Leon Romanovsky linux-rdma netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net/mlx5: Update mlx5_ifc with DEVX UCTX capabilities bitsinclude/linux/mlx5/mlx5_ifc.h+14 -22 replies
2/7IB/core: Introduce UVERBS_IDR_ANY_OBJECTdrivers/infiniband/core/rdma_core.c drivers/infiniband/core/rdma_core.h drivers/infiniband/core/uverbs_uapi.c +1 more+45 -130 replies
3/7IB/core: Enable getting an object type from a given uobjectdrivers/infiniband/core/rdma_core.h drivers/infiniband/core/uverbs_uapi.c include/rdma/uverbs_std_types.h+13 -50 replies
4/7IB/mlx5: Enable modify and query verbs objects via DEVXdrivers/infiniband/hw/mlx5/devx.c+96 -120 replies
5/7IB/mlx5: Enforce DEVX privilege by firmwaredrivers/infiniband/hw/mlx5/devx.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+14 -120 replies
6/7IB/mlx5: Update the supported DEVX commandsdrivers/infiniband/hw/mlx5/devx.c include/linux/mlx5/mlx5_ifc.h+27 -00 replies
7/7IB/mlx5: Allow XRC usage via verbs in DEVX contextdrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/qp.c drivers/infiniband/hw/mlx5/srq.c+6 -90 replies

Reviews trailers per patch

4 of 7 patches have a Reviewed-by or Acked-by.

PatchArtemy Kovalyov
1/7R-b
2/7
3/7
4/7
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH rdma-next 0/7] Enrich DEVX support

From: Leon Romanovsky <[email protected]>

Quoted 1 line

From Yishai,

-----------------------------------
This series enriches DEVX support in few aspects: it enables interoperability between DEVX and verbs and improves mechanism for controlling privileged DEVX commands.

The first patch updates mlx5 ifc file.

Next 3 patches enable modifying and querying verbs objects via the DEVX interface.

To achieve that the core layer introduced the 'UVERBS_IDR_ANY_OBJECT' type to match any IDR object. Once it's used by some driver's method, the infrastructure skips checking for the IDR type and it becomes the driver handler responsibility.

The DEVX methods of modify and query were changed to get any object type via the 'UVERBS_IDR_ANY_OBJECT' mechanism. The type checking is done per object as part of the driver code.

The next 3 patches introduce more robust mechanism for controlling privileged DEVX commands. The responsibility to block/allow per command was moved to be done in the firmware based on the UID credentials that the driver reports upon user context creation. This enables more granularity per command based on the device security model and the user credentials.

In addition, by introducing a valid range for 'general commands' we prevent the need to touch the driver's code any time that a new future command will be added.

The last patch fixes the XRC verbs flow once a DEVX context is used. This is needed as XRCD is some shared kernel resource and as such a kernel UID (=0) should be used in its related resources.

Thanks

Yishai Hadas (7):
net/mlx5: Update mlx5_ifc with DEVX UCTX capabilities bits IB/core: Introduce UVERBS_IDR_ANY_OBJECT
IB/core: Enable getting an object type from a given uobject IB/mlx5: Enable modify and query verbs objects via DEVX IB/mlx5: Enforce DEVX privilege by firmware IB/mlx5: Update the supported DEVX commands IB/mlx5: Allow XRC usage via verbs in DEVX context

 drivers/infiniband/core/rdma_core.c   |  27 +++--
 drivers/infiniband/core/rdma_core.h   |  21 ++--
 drivers/infiniband/core/uverbs_uapi.c |  10 +-
 drivers/infiniband/hw/mlx5/devx.c     | 142 ++++++++++++++++++++++----
 drivers/infiniband/hw/mlx5/main.c     |   4 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h  |   6 +-
 drivers/infiniband/hw/mlx5/qp.c       |  12 +--
 drivers/infiniband/hw/mlx5/srq.c      |   2 +-
 include/linux/mlx5/mlx5_ifc.h         |  26 ++++-
 include/rdma/uverbs_ioctl.h           |   6 ++
 include/rdma/uverbs_std_types.h       |  12 +++
 11 files changed, 215 insertions(+), 53 deletions(-)