[PATCH rdma-next 0/4] Convert AH and SRQ to core allocation

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

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Hi,

This is continuation of our conversion from driver allocations to core
responsibility. Current series converts SRQ and AH, while latter
required some code preparation.

The most challenge was in supporting AH to be allocated with GFP_ATOMIC
or GFP_KERNEL according to context. The common solution is to use in_atomic()
and in_interrupt() already used in many drivers, but unfortunately
checkpatch produces warning.

WARNING: use of in_atomic() is incorrect outside core kernel code
#37: FILE: include/rdma/ib_verbs.h:2288:
+               (in_atomic() || in_interrupt()) ? GFP_ATOMIC : GFP_KERNEL))

Thanks

Leon Romanovsky (4):
  RDMA/verbs: Prepare code to removal of destroy_ah callback
  RDMA/core: Support object allocation in atomic context
  RDMA: Handle AH allocations by IB/core
  RDMA: Handle SRQ allocations by IB/core

 drivers/infiniband/core/device.c              |   2 +
 drivers/infiniband/core/uverbs_cmd.c          |  13 +-
 drivers/infiniband/core/verbs.c               | 115 ++++++++++--------
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      |  76 ++++--------
 drivers/infiniband/hw/bnxt_re/ib_verbs.h      |  20 ++-
 drivers/infiniband/hw/bnxt_re/main.c          |   2 +
 drivers/infiniband/hw/bnxt_re/qplib_fp.c      |  12 +-
 drivers/infiniband/hw/bnxt_re/qplib_fp.h      |   4 +-
 drivers/infiniband/hw/bnxt_re/qplib_sp.c      |  12 +-
 drivers/infiniband/hw/bnxt_re/qplib_sp.h      |   4 +-
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h        |   7 +-
 drivers/infiniband/hw/cxgb4/provider.c        |   1 +
 drivers/infiniband/hw/cxgb4/qp.c              |  32 ++---
 drivers/infiniband/hw/hns/hns_roce_ah.c       |  25 +---
 drivers/infiniband/hw/hns/hns_roce_device.h   |  15 +--
 drivers/infiniband/hw/hns/hns_roce_main.c     |   5 +-
 drivers/infiniband/hw/hns/hns_roce_srq.c      |  52 +++-----
 drivers/infiniband/hw/mlx4/ah.c               |  96 ++++++---------
 drivers/infiniband/hw/mlx4/mad.c              |  33 +++--
 drivers/infiniband/hw/mlx4/main.c             |   4 +-
 drivers/infiniband/hw/mlx4/mlx4_ib.h          |  18 ++-
 drivers/infiniband/hw/mlx4/srq.c              |  47 +++----
 drivers/infiniband/hw/mlx5/ah.c               |  34 ++----
 drivers/infiniband/hw/mlx5/main.c             |  39 ++++--
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |  12 +-
 drivers/infiniband/hw/mlx5/srq.c              |  59 ++++-----
 drivers/infiniband/hw/mlx5/srq.h              |   2 +-
 drivers/infiniband/hw/mlx5/srq_cmd.c          |   8 +-
 drivers/infiniband/hw/mthca/mthca_provider.c  |  82 +++++--------
 drivers/infiniband/hw/ocrdma/ocrdma_ah.c      |  25 ++--
 drivers/infiniband/hw/ocrdma/ocrdma_ah.h      |   6 +-
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c      |  11 +-
 drivers/infiniband/hw/ocrdma/ocrdma_hw.h      |   6 +-
 drivers/infiniband/hw/ocrdma/ocrdma_main.c    |   4 +
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   |  47 +++----
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.h   |   6 +-
 drivers/infiniband/hw/qedr/main.c             |   3 +
 drivers/infiniband/hw/qedr/verbs.c            |  48 +++-----
 drivers/infiniband/hw/qedr/verbs.h            |  13 +-
 .../infiniband/hw/vmw_pvrdma/pvrdma_main.c    |   4 +
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c |  42 +++----
 .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.c   |  36 ++----
 .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h   |  13 +-
 drivers/infiniband/sw/rdmavt/ah.c             |  36 ++----
 drivers/infiniband/sw/rdmavt/ah.h             |   8 +-
 drivers/infiniband/sw/rdmavt/srq.c            |  43 +++----
 drivers/infiniband/sw/rdmavt/srq.h            |   7 +-
 drivers/infiniband/sw/rdmavt/vt.c             |   3 +
 drivers/infiniband/sw/rxe/rxe_pool.c          |   4 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c         |  61 ++++------
 drivers/infiniband/sw/rxe/rxe_verbs.h         |   4 +-
 include/rdma/ib_verbs.h                       |  22 ++--
 52 files changed, 533 insertions(+), 750 deletions(-)

--
2.20.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