Skip to content

Introduce UCAP API and usage in mlx5

Leon Romanovsky linux-doc linux-rdma lkml llvm oe-kbuild-all 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesApplied

Changes in v1 from the cover letter

* Used kref primitives instead of open-coded variant
* Check return value from dev_set_name()
* Added extra brackets around type in UCAP_ENABLED macro
v0: https://lore.kernel.org/all/[email protected]

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6RDMA/uverbs: Introduce UCAP (User CAPabilities) APIdrivers/infiniband/core/Makefile drivers/infiniband/core/ucaps.c drivers/infiniband/core/uverbs_main.c +1 more+296 -12 replies
2/6RDMA/mlx5: Create UCAP char devices for supported device capabilitiesdrivers/infiniband/hw/mlx5/main.c+47 -00 replies
3/6RDMA/uverbs: Add support for UCAPs in context creationdrivers/infiniband/core/uverbs_cmd.c drivers/infiniband/core/uverbs_std_types_device.c include/rdma/ib_verbs.h +1 more+25 -00 replies
4/6RDMA/mlx5: Check enabled UCAPs when creating ucontextdrivers/infiniband/hw/mlx5/devx.c drivers/infiniband/hw/mlx5/devx.h drivers/infiniband/hw/mlx5/main.c+58 -80 replies
5/6RDMA/mlx5: Expose RDMA TRANSPORT flow table types to userspacedrivers/infiniband/hw/mlx5/fs.c drivers/infiniband/hw/mlx5/fs.h drivers/infiniband/hw/mlx5/mlx5_ib.h +2 more+149 -130 replies
6/6docs: infiniband: document the UCAP APIDocumentation/infiniband/index.rst Documentation/infiniband/ucaps.rst+72 -00 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchYishai HadasMark BlochZhu Yanjun
1/6R-b R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH rdma-next v1 0/6] Introduce UCAP API and usage in mlx5

Changelog:
v1:
* Used kref primitives instead of open-coded variant
* Check return value from dev_set_name()
* Added extra brackets around type in UCAP_ENABLED macro
v0: https://lore.kernel.org/all/[email protected]

--------------------------------------------------------------------------
This series introduces the User CAPability (UCAP) API that allows creating user contexts with various firmware privileges.

The UCAP API provides fine-grained control over specific firmware features by representing each capability as a character device with root read-write access. Root processes can grant users special privileges by allowing access to these character devices. User contexts created using a file descriptor of a UCAP will have specific UCAP privileges.

Two UCAP character devices are created for mlx5, and user contexts opened with at least one of these UCAPs are considered privileged. To ensure that privileged commands can always proceed, non-privileged commands are limited when a privileged user is present on the device.

Thanks

Chiara Meiohas (5):
RDMA/uverbs: Introduce UCAP (User CAPabilities) API RDMA/mlx5: Create UCAP char devices for supported device capabilities RDMA/uverbs: Add support for UCAPs in context creation RDMA/mlx5: Check enabled UCAPs when creating ucontext
docs: infiniband: document the UCAP API

Patrisious Haddad (1):
RDMA/mlx5: Expose RDMA TRANSPORT flow table types to userspace

 Documentation/infiniband/index.rst            |   1 +
 Documentation/infiniband/ucaps.rst            |  71 +++++
 drivers/infiniband/core/Makefile              |   3 +-
 drivers/infiniband/core/ucaps.c               | 267 ++++++++++++++++++
 drivers/infiniband/core/uverbs_cmd.c          |  19 ++
 drivers/infiniband/core/uverbs_main.c         |   2 +
 .../infiniband/core/uverbs_std_types_device.c |   4 +
 drivers/infiniband/hw/mlx5/devx.c             |  31 +-
 drivers/infiniband/hw/mlx5/devx.h             |   5 +-
 drivers/infiniband/hw/mlx5/fs.c               | 154 +++++++++-
 drivers/infiniband/hw/mlx5/fs.h               |   2 +
 drivers/infiniband/hw/mlx5/main.c             |  77 ++++-
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |   3 +
 include/rdma/ib_ucaps.h                       |  25 ++
 include/rdma/ib_verbs.h                       |   1 +
 include/uapi/rdma/ib_user_ioctl_cmds.h        |   1 +
 include/uapi/rdma/mlx5_user_ioctl_cmds.h      |   1 +
 include/uapi/rdma/mlx5_user_ioctl_verbs.h     |   2 +
 18 files changed, 647 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/infiniband/ucaps.rst
 create mode 100644 drivers/infiniband/core/ucaps.c
 create mode 100644 include/rdma/ib_ucaps.h
Signature · 1 line
2.48.1