mbox series

[for-next,v1,0/2] ib_umem_get extract ib_ucontext from ib_udata

Message ID 20190109091516.3922-1-shamir.rabinovitch@oracle.com (mailing list archive)
Headers show
Series ib_umem_get extract ib_ucontext from ib_udata | expand

Message

Shamir Rabinovitch Jan. 9, 2019, 9:15 a.m. UTC
As preparation for shared ib_pd model, a cleanup in rdma code is needed
which currently rely on the ib_pd->uobject->ucontext . As suggested by
Jason in the RFC patch, the ucontext will be taken from ib_udata.
ib_ueme_get was one of those places that tied themself to the ib_pd 
uobject. Cahnge this to allow more easy transition to shared ib_pd model
in the future.

Shamir Rabinovitch (2):
  IB/{core,uverbs}: move ib_umem_xxx functions from ib_core to ib_uverbs
  IB/{core,hw}: ib_umem_get extract ib_ucontext from ib_udata

 drivers/infiniband/core/Makefile              |  4 ++--
 drivers/infiniband/core/umem.c                |  9 +++++--
 drivers/infiniband/core/uverbs_main.c         | 24 +++++++++++++++++++
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 10 ++++----
 drivers/infiniband/hw/cxgb3/iwch_provider.c   |  2 +-
 drivers/infiniband/hw/cxgb4/mem.c             |  2 +-
 drivers/infiniband/hw/hns/hns_roce_cq.c       |  6 ++---
 drivers/infiniband/hw/hns/hns_roce_db.c       |  5 ++--
 drivers/infiniband/hw/hns/hns_roce_mr.c       |  4 ++--
 drivers/infiniband/hw/hns/hns_roce_qp.c       |  2 +-
 drivers/infiniband/hw/hns/hns_roce_srq.c      |  4 ++--
 drivers/infiniband/hw/i40iw/i40iw_verbs.c     |  2 +-
 drivers/infiniband/hw/mlx4/cq.c               | 12 +++++-----
 drivers/infiniband/hw/mlx4/doorbell.c         |  5 ++--
 drivers/infiniband/hw/mlx4/mlx4_ib.h          |  3 ++-
 drivers/infiniband/hw/mlx4/mr.c               | 11 +++++----
 drivers/infiniband/hw/mlx4/qp.c               |  5 ++--
 drivers/infiniband/hw/mlx4/srq.c              |  4 ++--
 drivers/infiniband/hw/mlx5/cq.c               |  7 +++---
 drivers/infiniband/hw/mlx5/devx.c             |  2 +-
 drivers/infiniband/hw/mlx5/doorbell.c         |  5 ++--
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |  4 +++-
 drivers/infiniband/hw/mlx5/mr.c               | 22 ++++++++---------
 drivers/infiniband/hw/mlx5/odp.c              |  4 ++--
 drivers/infiniband/hw/mlx5/qp.c               | 24 +++++++++----------
 drivers/infiniband/hw/mlx5/srq.c              |  4 ++--
 drivers/infiniband/hw/mthca/mthca_provider.c  |  2 +-
 drivers/infiniband/hw/nes/nes_verbs.c         |  2 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   |  2 +-
 drivers/infiniband/hw/qedr/verbs.c            | 24 +++++++++----------
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c  |  2 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c  |  2 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c  |  4 ++--
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c |  2 +-
 drivers/infiniband/sw/rdmavt/mr.c             |  2 +-
 drivers/infiniband/sw/rxe/rxe_mr.c            |  2 +-
 include/rdma/ib_umem.h                        |  5 ++--
 include/rdma/ib_verbs.h                       |  1 +
 38 files changed, 137 insertions(+), 99 deletions(-)

Comments

Jason Gunthorpe Jan. 9, 2019, 6:07 p.m. UTC | #1
On Wed, Jan 09, 2019 at 11:15:14AM +0200, Shamir Rabinovitch wrote:
> As preparation for shared ib_pd model, a cleanup in rdma code is needed
> which currently rely on the ib_pd->uobject->ucontext . As suggested by
> Jason in the RFC patch, the ucontext will be taken from ib_udata.
> ib_ueme_get was one of those places that tied themself to the ib_pd 
> uobject. Cahnge this to allow more easy transition to shared ib_pd model
> in the future.
> 
> Shamir Rabinovitch (2):
>   IB/{core,uverbs}: move ib_umem_xxx functions from ib_core to ib_uverbs
>   IB/{core,hw}: ib_umem_get extract ib_ucontext from ib_udata

Applied to for-next. I fixed the merge conflicts, compilation failures
and ran clang-format over it. Do check again.

Jason