[PATCH rdma-next 00/12] RDMA ioctl() improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Hi,

This series is combination of IOCTL() interface improvements from Matan
together with addition of egress flow steering and mlx5 implementation
will follow after we will converge with pull requests.

The mlx4 patch is needed for "IB/uverbs: Introduce egress flow
steering", but separated from that patch for easy review.

Thanks

Rest (as is) from Matan
----------------------------
Hi,

This series contains improvements to RDMA ioctl() infrastructure.
Later patches will use this extensively.

The first patch moves to a new consistent naming. We link different
methods and handlers by using DECLARE_COMMON_METHOD and UVERBS_HANDLER
macros (similarly for objects). This makes it easier to find how
objects, methods and handlers are linked together.

This patch also contains a major change towards sharing uapi headers
between user-space and kernel. The new files are named as follows:
[subsystem]_user_ioctl_[cmds/verbs].
[subsystem] =  rdma, ib, provider drivers.
               rdma contains standard ioctl() infrastructure definitions.
               ib contains the verbs definitions.
               Different provider drivers contain their own uapi structs
               and definitions.
[cmds/verbs] = The goal here to share as much between applications and
               kernel, thus avoid unnecessary copies. Therefore,
               sometimes we need to export an attribute struct that will
               be given straight from the user-space. In order to achieve
               that, we split the definitions into to: _verbs.h include
               structs and enums that should be used straight from the
               application, while _cmds.h file includes the rest (mainly,
               definitions that are only used by the communicating
               library).

The second patch adds a driver_id to the uverbs_hdr. Since this uapi is
still experimental. We're enhancing it before turning it on by default.
This could be later use for having a smart strace (that decodes commands
successfully).

The third patch adds a compact representation of attribute specifications.
Since we plan to have a lot of attributes from different types, we want
to minimize our memory footprint. This makes sure that adding enum
attributes (will be added in a next series) doesn't affect our memory
footprint too much.

The fourth patch adds a way to safely extend attributes. The spec language
is enhanced to contain more than the sizeof(type). We state the minimal
acceptable size and the known kernel size. The parser checks that it was
given at least the minimal size and that all the unknown size is zeroed.
This is used by the new UVERBS_ATTR_SPEC_F_MIN_SZ_OR_ZERO flag which
replaces the old UVERBS_ATTR_SPEC_F_MIN_SZ one. Unbounded size is given
as minimum zero and USHRT_MAX known size.

The fifth patch exposes the uverbs standard parsing tree. Previously,
when the uverbs client registered, it registered the standard parsing tree
(if the driver hasn't registered one of its own). Up until now, no driver
had a custom parsing tree, but since we're going to add a driver that uses
both the standard parsing tree and adds some additions to it, we want to
expose the custom tree for being used in the provider drivers.

Regards,
   Matan

Boris Pismenny (2):
  IB/mlx4: Check for egress flow steering
  IB/uverbs: Introduce egress flow steering

Matan Barak (10):
  IB/uverbs: Move to new headers and make naming consistent
  IB/uverbs: Extend uverbs_ioctl header with driver_id
  IB/uverbs: Enable compact representation of uverbs_attr_spec
  IB/uverbs: Safely extend existing attributes
  IB/uverbs: Add enum attribute type to ioctl() interface
  IB/uverbs: Refactor kern_spec_to_ib_spec_filter
  IB/uverbs: Add flow_action create and destroy verbs
  IB/uverbs: Add action_handle flow steering specification
  IB/uverbs: Expose parsing tree of all common objects to providers
  IB/uverbs: Enable ioctl() uAPI by default for new verbs

 drivers/infiniband/Kconfig                         |  11 +-
 drivers/infiniband/core/uverbs.h                   |  30 ++
 drivers/infiniband/core/uverbs_cmd.c               | 251 +++++++----
 drivers/infiniband/core/uverbs_ioctl.c             |  46 +-
 drivers/infiniband/core/uverbs_ioctl_merge.c       |   2 +-
 drivers/infiniband/core/uverbs_main.c              |   4 -
 drivers/infiniband/core/uverbs_std_types.c         | 492 ++++++++++++++++++---
 drivers/infiniband/hw/bnxt_re/main.c               |   1 +
 drivers/infiniband/hw/cxgb3/iwch_provider.c        |   1 +
 drivers/infiniband/hw/cxgb4/provider.c             |   1 +
 drivers/infiniband/hw/hfi1/verbs.c                 |   2 +-
 drivers/infiniband/hw/hns/hns_roce_main.c          |   1 +
 drivers/infiniband/hw/i40iw/i40iw_verbs.c          |   1 +
 drivers/infiniband/hw/mlx4/main.c                  |   4 +
 drivers/infiniband/hw/mlx5/main.c                  |   1 +
 drivers/infiniband/hw/mthca/mthca_provider.c       |   1 +
 drivers/infiniband/hw/nes/nes_verbs.c              |   1 +
 drivers/infiniband/hw/ocrdma/ocrdma_main.c         |   1 +
 drivers/infiniband/hw/qedr/main.c                  |   1 +
 drivers/infiniband/hw/qib/qib_verbs.c              |   2 +-
 drivers/infiniband/hw/usnic/usnic_ib_main.c        |   1 +
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c     |   1 +
 drivers/infiniband/sw/rdmavt/vt.c                  |   3 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c              |   1 +
 include/rdma/ib_verbs.h                            | 122 ++++-
 include/rdma/rdma_vt.h                             |   2 +-
 include/rdma/uverbs_ioctl.h                        | 138 ++++--
 include/rdma/uverbs_std_types.h                    |  34 +-
 ...{ib_user_ioctl_verbs.h => ib_user_ioctl_cmds.h} |  63 ++-
 include/uapi/rdma/ib_user_ioctl_verbs.h            |  96 ++--
 include/uapi/rdma/ib_user_verbs.h                  |  13 +
 include/uapi/rdma/rdma_user_ioctl.h                |  38 +-
 include/uapi/rdma/rdma_user_ioctl_cmds.h           | 100 +++++
 33 files changed, 1143 insertions(+), 323 deletions(-)
 copy include/uapi/rdma/{ib_user_ioctl_verbs.h => ib_user_ioctl_cmds.h} (58%)
 create mode 100644 include/uapi/rdma/rdma_user_ioctl_cmds.h

--
2.16.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux