[PATCH rdma-next 00/10] Have the core handler dispatch code create the driver udata

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

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

It is based on previous patch set:
https://patchwork.kernel.org/project/linux-rdma/list/?series=41949

--------------------------------------------------
>From Jason,

This consolidates the driver udata creation into the handler dispatching
code for write, write_ex and ioctl. This makes all of the handlers have
a consistent experience when accessing the driver's udata. It is always
located in an uverbs_attr_bundle, and always set before the first
handler is invoked.

Reworking like this allows the dispatcher to control the memory layout
of the udata and removes the built-in assumption that the udata directly
follows the command data on the write path.

This is the next step toward making the write, write_ex, and ioctl
interfaces use a uniform handler calling convention.

This is also the first step toward passing the 'struct uverbs_attr_bundle'
into the drivers, instead of using the more limited 'struct ib_udata'.
At this point all the driver callbacks could recover the attr_bundle
by using container_of on the udata pointer.

Thanks

Jason Gunthorpe (10):
  RDMA/uverbs: Use C99 flex array syntax for trailing members in uapi
    headers
  RDMA/uverbs: Add missing driver_data
  RDMA/uverbs: Replace ib_uverbs_file with uverbs_attr_bundle for write
  RDMA/uverbs: Make write() handlers return 0 on success
  RDMA/uverbs: Do not pass ib_uverbs_file to ioctl methods
  RDMA/uverbs: Add structure size info to write commands
  RDMA/uverbs: Prohibit write() calls with too small buffers
  RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write_ex
  RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write
  RDMA/uverbs: Use uverbs_attr_bundle to pass udata for ioctl()

 drivers/infiniband/core/rdma_core.c           |   19 +-
 drivers/infiniband/core/rdma_core.h           |   16 +-
 drivers/infiniband/core/uverbs_cmd.c          | 1082 +++++++++--------
 drivers/infiniband/core/uverbs_ioctl.c        |   10 +-
 drivers/infiniband/core/uverbs_main.c         |   83 +-
 drivers/infiniband/core/uverbs_std_types.c    |    3 +-
 .../core/uverbs_std_types_counters.c          |    4 +-
 drivers/infiniband/core/uverbs_std_types_cq.c |   13 +-
 drivers/infiniband/core/uverbs_std_types_dm.c |    5 +-
 .../core/uverbs_std_types_flow_action.c       |   10 +-
 drivers/infiniband/core/uverbs_std_types_mr.c |    2 +-
 drivers/infiniband/core/uverbs_uapi.c         |   19 +-
 drivers/infiniband/hw/mlx5/devx.c             |   25 +-
 drivers/infiniband/hw/mlx5/flow.c             |    6 +-
 include/rdma/ib_verbs.h                       |    6 +-
 include/rdma/uverbs_ioctl.h                   |   41 +-
 include/rdma/uverbs_std_types.h               |   52 +-
 include/uapi/rdma/ib_user_verbs.h             |   70 +-
 18 files changed, 807 insertions(+), 659 deletions(-)

--
2.19.1




[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