mbox series

[for-next,0/1] IB/{hw,sw}: remove 'uobject->context' dependency APIs

Message ID 20190117190708.31307-1-shamir.rabinovitch@oracle.com (mailing list archive)
Headers show
Series IB/{hw,sw}: remove 'uobject->context' dependency APIs | expand

Message

Shamir Rabinovitch Jan. 17, 2019, 7:06 p.m. UTC
This patch continue the cleanup started with Jason RFC patch. This patch
clean only the ib_xxx creation APIs beacuse those APIs do have ib_udata.

The final goal of this cleanup is to remove the dependency in the IB
code in the ib_xxx->uobject pointer as step toward shared ib_xxx
objects.

Seperate patch will be sent for the ib_xxx deletion APIs which do not
have the ib_udata. For those the solution will have to be different.

Shamir Rabinovitch (1):
  IB/{hw,sw}: remove 'uobject->context' dependency in object creation
    APIs

 drivers/infiniband/hw/bnxt_re/ib_verbs.c     | 33 +++++--
 drivers/infiniband/hw/cxgb3/iwch_provider.c  |  4 +-
 drivers/infiniband/hw/cxgb4/qp.c             |  8 +-
 drivers/infiniband/hw/hns/hns_roce_qp.c      | 15 +++-
 drivers/infiniband/hw/i40iw/i40iw_verbs.c    | 15 +++-
 drivers/infiniband/hw/mlx4/doorbell.c        |  6 ++
 drivers/infiniband/hw/mlx4/mr.c              |  9 +-
 drivers/infiniband/hw/mlx4/qp.c              | 92 +++++++++++++-------
 drivers/infiniband/hw/mlx4/srq.c             | 13 ++-
 drivers/infiniband/hw/mlx5/qp.c              | 68 +++++++++++----
 drivers/infiniband/hw/mlx5/srq.c             | 13 ++-
 drivers/infiniband/hw/mthca/mthca_provider.c | 28 ++++--
 drivers/infiniband/hw/mthca/mthca_qp.c       | 19 ++--
 drivers/infiniband/hw/mthca/mthca_srq.c      | 25 ++++--
 drivers/infiniband/hw/nes/nes_verbs.c        | 13 ++-
 drivers/infiniband/hw/qedr/verbs.c           |  8 +-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c |  7 +-
 drivers/infiniband/sw/rdmavt/qp.c            | 10 ++-
 drivers/infiniband/sw/rdmavt/srq.c           | 10 ++-
 drivers/infiniband/sw/rxe/rxe_qp.c           |  5 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c        |  5 +-
 21 files changed, 287 insertions(+), 119 deletions(-)

Comments

Jason Gunthorpe Jan. 18, 2019, 8:11 p.m. UTC | #1
On Thu, Jan 17, 2019 at 09:06:57PM +0200, Shamir Rabinovitch wrote:
> This patch continue the cleanup started with Jason RFC patch. This patch
> clean only the ib_xxx creation APIs beacuse those APIs do have ib_udata.
> 
> The final goal of this cleanup is to remove the dependency in the IB
> code in the ib_xxx->uobject pointer as step toward shared ib_xxx
> objects.
> 
> Seperate patch will be sent for the ib_xxx deletion APIs which do not
> have the ib_udata. For those the solution will have to be different.

This is a problem too - we should probably figure it out before moving
too much further ahead. The delete APIs can be called from any
ucontext that has the shared object, and it seems like many drivers
require the destroy's ucontext to match the create ucontext..

What is the plan here? Ban drivers from sharing that are like this?

Jason