@@ -3926,7 +3926,7 @@ int hns_roce_v1_destroy_qp(struct ib_qp *ibqp)
struct hns_roce_qp_work *qp_work;
struct hns_roce_v1_priv *priv;
struct hns_roce_cq *send_cq, *recv_cq;
- bool is_user = ibqp->uobject;
+ bool is_user = rdma_is_user_pd(ibqp->pd);
int is_timeout = 0;
int ret;
@@ -951,7 +951,8 @@ static int mthca_max_data_size(struct mthca_dev *dev, struct mthca_qp *qp, int d
static inline int mthca_max_inline_data(struct mthca_pd *pd, int max_data_size)
{
/* We don't support inline data for kernel QPs (yet). */
- return pd->ibpd.uobject ? max_data_size - MTHCA_INLINE_HEADER_SIZE : 0;
+ return rdma_is_user_pd(&pd->ibpd) ?
+ max_data_size - MTHCA_INLINE_HEADER_SIZE : 0;
}
static void mthca_adjust_qp_caps(struct mthca_dev *dev,
@@ -733,7 +733,7 @@ static int nes_dealloc_pd(struct ib_pd *ibpd)
struct nes_device *nesdev = nesvnic->nesdev;
struct nes_adapter *nesadapter = nesdev->nesadapter;
- if ((ibpd->uobject) && (ibpd->uobject->context)) {
+ if (rdma_is_user_pd(ibpd) && (ibpd->uobject->context)) {
nesucontext = to_nesucontext(ibpd->uobject->context);
nes_debug(NES_DBG_PD, "Clearing bit %u from allocated doorbells\n",
nespd->mmap_db_index);
Now we have the ability to tell from ib_pd if ib_pd was created by user/kernel verbs. Stop using the ib_pd->uobject pointer for this. This patch prepare the ib_pb uobject pointer removal that will happen in another patch. Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/infiniband/hw/mthca/mthca_qp.c | 3 ++- drivers/infiniband/hw/nes/nes_verbs.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)