[PATCH rdma-next v1 0/3] Allocate PD object in IB/core instead of drivers

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

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Changelog:
 v0->v1:
  * Used various to_XXXpd() macros rovided by drivers instead of container_of() - Shiraz
  * Cleaned a little bit macros after Jason's susggestion and Bart's
    snippet from other patch.

----------------------------------------------------------------
Hi,

This series is a followup to discussed on the mailing list approach to
provide drivers common infrastructure for SW/HW allocated IDs. Those
IDs are essential part of two main core features:
1. netlink interface to query specific objects from user space (rdmatool)
2. internal resource management, instead of home grown bitmaps and trees
used by various drivers.

However for mentioned infrastructure to work, it relies on the fact that
the pointer to ib_device is already set, prior to call to various
alloc_XXX() functions.

In this series, I converted all drivers to use IB/core ib_pd allocation
to ensure that ib_device pointer is valid and used mlx5 driver as an example
of how to use HW ID allocator.

IMPRTANT!!! I don't have HW for most of the drivers here and patch
"RDMA: Handle PD allocations by IB/core" is checked with compiler only.

Other objects and drivers will follow and help is appreciated.

Thanks

Leon Romanovsky (3):
  RDMA/core: Share driver structure size with core
  RDMA: Handle PD allocations by IB/core
  RDMA/mlx5: Use restrack allocation PD scheme

 drivers/infiniband/core/device.c              |  4 +
 drivers/infiniband/core/uverbs_cmd.c          | 15 ++-
 drivers/infiniband/core/uverbs_std_types.c    |  2 +-
 drivers/infiniband/core/verbs.c               | 27 +++---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 37 +++-----
 drivers/infiniband/hw/bnxt_re/ib_verbs.h      |  9 +-
 drivers/infiniband/hw/bnxt_re/main.c          |  1 +
 drivers/infiniband/hw/cxgb3/iwch_provider.c   | 25 ++---
 drivers/infiniband/hw/cxgb4/provider.c        | 25 ++---
 drivers/infiniband/hw/hns/hns_roce_device.h   |  7 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c    | 27 +++---
 drivers/infiniband/hw/hns/hns_roce_main.c     |  1 +
 drivers/infiniband/hw/hns/hns_roce_pd.c       | 25 ++---
 drivers/infiniband/hw/i40iw/i40iw_utils.c     |  1 -
 drivers/infiniband/hw/i40iw/i40iw_verbs.c     | 32 +++----
 drivers/infiniband/hw/mlx4/main.c             | 36 +++-----
 drivers/infiniband/hw/mlx5/main.c             | 83 +++++++++++------
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |  1 -
 drivers/infiniband/hw/mlx5/mr.c               | 16 ++--
 drivers/infiniband/hw/mlx5/qp.c               | 21 +++--
 drivers/infiniband/hw/mlx5/srq.c              |  2 +-
 drivers/infiniband/hw/mthca/mthca_provider.c  | 29 ++----
 drivers/infiniband/hw/nes/nes_verbs.c         | 32 +++----
 drivers/infiniband/hw/ocrdma/ocrdma_main.c    |  1 +
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   | 92 ++++++++-----------
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.h   |  6 +-
 drivers/infiniband/hw/qedr/main.c             |  1 +
 drivers/infiniband/hw/qedr/verbs.c            | 34 ++-----
 drivers/infiniband/hw/qedr/verbs.h            |  6 +-
 drivers/infiniband/hw/usnic/usnic_ib_main.c   |  1 +
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c  | 26 ++----
 drivers/infiniband/hw/usnic/usnic_ib_verbs.h  |  7 +-
 .../infiniband/hw/vmw_pvrdma/pvrdma_main.c    |  1 +
 .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.c   | 43 +++------
 .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h   |  7 +-
 drivers/infiniband/sw/rdmavt/pd.c             | 29 ++----
 drivers/infiniband/sw/rdmavt/pd.h             |  7 +-
 drivers/infiniband/sw/rdmavt/vt.c             |  1 +
 drivers/infiniband/sw/rxe/rxe.c               |  8 --
 drivers/infiniband/sw/rxe/rxe_pool.c          |  4 -
 drivers/infiniband/sw/rxe/rxe_pool.h          |  1 -
 drivers/infiniband/sw/rxe/rxe_qp.c            |  4 -
 drivers/infiniband/sw/rxe/rxe_verbs.c         | 34 ++-----
 drivers/infiniband/sw/rxe/rxe_verbs.h         |  2 -
 include/rdma/ib_verbs.h                       | 22 ++++-
 45 files changed, 337 insertions(+), 458 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