RDMA/providers: Fix return value when QP type isn't supported
Subsystems (12)
PATCH 1/1 RDMA/providers: Fix return value when QP type isn't supported
The proper return code is "-EOPNOTSUPP" when the requested QP type is not supported by the provider.
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -1
@@ -1016,7 +1016,7 @@ struct ib_qp *bnxt_re_create_qp(struct ib_pd *ib_pd,if (qp->qplib_qp.type ==IB_QPT_MAX ) {dev_err (rdev_to_dev (rdev),"QP type 0x%x not supported" , qp->qplib_qp.type); - rc = -EINVAL ; + rc = -EOPNOTSUPP ; goto fail; }
drivers/infiniband/hw/cxgb4/qp.c +1 -1
@@ -2127,7 +2127,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,pr_debug ("ib_pd %p\n" , pd);if (attrs->qp_type !=IB_QPT_RC ) -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); php =to_c4iw_pd (pd); rhp = php->rhp;
drivers/infiniband/hw/hns/hns_roce_qp.c +1 -1
@@ -1097,7 +1097,7 @@ struct ib_qp *hns_roce_create_qp(struct ib_pd *pd,default :{ibdev_err (ibdev,"not support QP type %d\n" , init_attr->qp_type); -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); } }
drivers/infiniband/hw/i40iw/i40iw_verbs.c +1 -1
@@ -617,7 +617,7 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd, iwqp->ctx_info.qp_compl_ctx = (uintptr_t )qp;if (init_attr->qp_type !=IB_QPT_RC ) { - err_code = -EINVAL ; + err_code = -EOPNOTSUPP ; goto error; }if (iwdev->push_mode)
drivers/infiniband/hw/mlx4/qp.c +1 -1
@@ -1636,7 +1636,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, }default :/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }return &qp->ibqp;
drivers/infiniband/hw/mlx5/qp.c +1 -1
@@ -2789,7 +2789,7 @@ struct ib_qp *mlx5_ib_create_qp(struct ib_pd *pd,mlx5_ib_dbg (dev,"unsupported qp type %d\n" , init_attr->qp_type);/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }if (verbs_init_attr->qp_type ==IB_QPT_DRIVER )
drivers/infiniband/hw/mthca/mthca_provider.c +1 -1
@@ -561,7 +561,7 @@ static struct ib_qp *mthca_create_qp(struct ib_pd *pd, }default :/* Don't support raw QPs */ -return ERR_PTR (-ENOSYS ); +return ERR_PTR (-EOPNOTSUPP ); }if (err) {
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
@@ -1111,7 +1111,7 @@ static int ocrdma_check_qp_params(struct ib_pd *ibpd, struct ocrdma_dev *dev, (attrs->qp_type != IB_QPT_UD)) {pr_err ("%s(%d) unsupported qp type=0x%x requested\n" , __func__, dev->id, attrs->qp_type); -return -EINVAL ; +return -EOPNOTSUPP ; }/* Skip the check for QP1 to support CM size of 128 */ if ((attrs->qp_type != IB_QPT_GSI) &&
drivers/infiniband/hw/qedr/verbs.c +1 -1
@@ -1186,7 +1186,7 @@ static int qedr_check_qp_attrs(struct ib_pd *ibpd, struct qedr_dev *dev,DP_DEBUG (dev,QEDR_MSG_QP ,"create qp: unsupported qp type=0x%x requested\n" , attrs->qp_type); -return -EINVAL ; +return -EOPNOTSUPP ; }if (attrs->cap.max_send_wr > qattr->max_sqe) {
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1 -1
@@ -504,7 +504,7 @@ struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd,if (init_attr->qp_type !=IB_QPT_UD ) {usnic_err ("%s asked to make a non-UD QP: %d\n" ,dev_name (&us_ibdev->ib_dev.dev), init_attr->qp_type); -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); } trans_spec = cmd.spec;
drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +1 -1
@@ -217,7 +217,7 @@ struct ib_qp *pvrdma_create_qp(struct ib_pd *pd, init_attr->qp_type != IB_QPT_GSI) {dev_warn (&dev->pdev->dev,"queuepair type %d not supported\n" , init_attr->qp_type); -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }if (is_srq && !dev->dsr->caps.max_srq) {
drivers/infiniband/sw/rdmavt/qp.c +1 -1
@@ -1196,7 +1196,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,default :/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); } init_attr->cap.max_inline_data =0 ;
drivers/infiniband/sw/siw/siw_verbs.c +1 -1
@@ -322,7 +322,7 @@ struct ib_qp *siw_create_qp(struct ib_pd *pd, }if (attrs->qp_type !=IB_QPT_RC ) {siw_dbg (base_dev,"only RC QP's supported\n" ); - rv = -EINVAL ; + rv = -EOPNOTSUPP ; goto err_out; } if ((attrs->cap.max_send_wr > SIW_MAX_QP_WR) ||
Signature · 1 line
2.21.1
Quoted 4 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>
Quoted 15 lines
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
*_err() prints definitely should go too. Simple user space application will create DDOS on dmesg with those prints.
I would say that other prints should be removed too or at least put in general way inside the caller of ->create_qp() callback.
Thanks
Quoted 21 lines · Leon Romanovsky
Quoted 4 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>Quoted 15 lines
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
Quoted 5 lines
*_err()prints definitely should go too. Simple user space application will create DDOS on dmesg with those prints.I would say that other prints should be removed too or at least put in general way inside the caller of ->create_qp() callback.
I'd agree but I don't think that has to be done in this patch. This looks fine to me.
-Denny
Quoted 22 lines · Dennis Dalessandro
Quoted 21 lines · Leon Romanovsky
Quoted 19 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
Quoted 8 lines
Quoted 5 lines
*_err()prints definitely should go too. Simple user space application will create DDOS on dmesg with those prints.I would say that other prints should be removed too or at least put in general way inside the caller of ->create_qp() callback.
I'd agree but I don't think that has to be done in this patch. This looks fine to me.
No doubts, I simply want to reduce the amount of churn.
Thanks
Quoted 4 lines
-Denny
Quoted 4 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>
Quoted 15 lines
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
Quoted 4 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>
Anything blocking this patch from getting merged?
Quoted 188 lines
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)drivers/infiniband/hw/bnxt_re/ib_verbs.c +1
-1@@ -1016,7 +1016,7 @@ struct ib_qp *bnxt_re_create_qp(struct ib_pd *ib_pd,if (qp->qplib_qp.type ==IB_QPT_MAX ) {dev_err (rdev_to_dev (rdev),"QP type 0x%x not supported" , qp->qplib_qp.type); - rc = -EINVAL ; + rc = -EOPNOTSUPP ; goto fail; }drivers/infiniband/hw/cxgb4/qp.c +1
-1@@ -2127,7 +2127,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,pr_debug ("ib_pd %p\n" , pd);if (attrs->qp_type !=IB_QPT_RC ) -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); php =to_c4iw_pd (pd); rhp = php->rhp;drivers/infiniband/hw/hns/hns_roce_qp.c +1
-1@@ -1097,7 +1097,7 @@ struct ib_qp *hns_roce_create_qp(struct ib_pd *pd,default :{ibdev_err (ibdev,"not support QP type %d\n" , init_attr->qp_type); -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); } }drivers/infiniband/hw/i40iw/i40iw_verbs.c +1
-1@@ -617,7 +617,7 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd, iwqp->ctx_info.qp_compl_ctx = (uintptr_t )qp;if (init_attr->qp_type !=IB_QPT_RC ) { - err_code = -EINVAL ; + err_code = -EOPNOTSUPP ; goto error; }if (iwdev->push_mode)drivers/infiniband/hw/mlx4/qp.c +1
-1@@ -1636,7 +1636,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, }default :/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }return &qp->ibqp;drivers/infiniband/hw/mlx5/qp.c +1
-1@@ -2789,7 +2789,7 @@ struct ib_qp *mlx5_ib_create_qp(struct ib_pd *pd,mlx5_ib_dbg (dev,"unsupported qp type %d\n" , init_attr->qp_type);/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }if (verbs_init_attr->qp_type ==IB_QPT_DRIVER )drivers/infiniband/hw/mthca/mthca_provider.c +1
-1@@ -561,7 +561,7 @@ static struct ib_qp *mthca_create_qp(struct ib_pd *pd, }default :/* Don't support raw QPs */ -return ERR_PTR (-ENOSYS ); +return ERR_PTR (-EOPNOTSUPP ); }if (err) {drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-1@@ -1111,7 +1111,7 @@ static int ocrdma_check_qp_params(struct ib_pd *ibpd, struct ocrdma_dev *dev, (attrs->qp_type != IB_QPT_UD)) {pr_err ("%s(%d) unsupported qp type=0x%x requested\n" , __func__, dev->id, attrs->qp_type); -return -EINVAL ; +return -EOPNOTSUPP ; }/* Skip the check for QP1 to support CM size of 128 */ if ((attrs->qp_type != IB_QPT_GSI) &&drivers/infiniband/hw/qedr/verbs.c +1
-1@@ -1186,7 +1186,7 @@ static int qedr_check_qp_attrs(struct ib_pd *ibpd, struct qedr_dev *dev,DP_DEBUG (dev,QEDR_MSG_QP ,"create qp: unsupported qp type=0x%x requested\n" , attrs->qp_type); -return -EINVAL ; +return -EOPNOTSUPP ; }if (attrs->cap.max_send_wr > qattr->max_sqe) {drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1
-1@@ -504,7 +504,7 @@ struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd,if (init_attr->qp_type !=IB_QPT_UD ) {usnic_err ("%s asked to make a non-UD QP: %d\n" ,dev_name (&us_ibdev->ib_dev.dev), init_attr->qp_type); -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); } trans_spec = cmd.spec;drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +1
-1@@ -217,7 +217,7 @@ struct ib_qp *pvrdma_create_qp(struct ib_pd *pd, init_attr->qp_type != IB_QPT_GSI) {dev_warn (&dev->pdev->dev,"queuepair type %d not supported\n" , init_attr->qp_type); -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }if (is_srq && !dev->dsr->caps.max_srq) {drivers/infiniband/sw/rdmavt/qp.c +1
-1@@ -1196,7 +1196,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,default :/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); } init_attr->cap.max_inline_data =0 ;drivers/infiniband/sw/siw/siw_verbs.c +1
-1@@ -322,7 +322,7 @@ struct ib_qp *siw_create_qp(struct ib_pd *pd, }if (attrs->qp_type !=IB_QPT_RC ) {siw_dbg (base_dev,"only RC QP's supported\n" ); - rv = -EINVAL ; + rv = -EOPNOTSUPP ; goto err_out; } if ((attrs->cap.max_send_wr > SIW_MAX_QP_WR) ||Signature · 1 line
2.21.1
Quoted 7 lines · Kamal Heib
Quoted 4 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>Anything blocking this patch from getting merged?
It is tricky to check that nobody is reading the error code this changed. Did you check it?
Jason
Quoted 4 lines · Kamal Heib
The proper return code is "
-EOPNOTSUPP" when the requested QP type is not supported by the provider.Signed-off-by Kamal Heib <[email protected]>
Quoted 15 lines
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
Well, it looks like we already have providers returning EOPNOTSUPP for various cases under create_qp, so all callers already need to handle it.
However, there are still lots of cases even within the create_qp flow where the return codes are wrong. Below is what I thought for mlx5, so this problem space needs a lot more attention.
But, fixing the obvious places that check qp_type seems like a reasonable step, so applied to for-next
drivers/infiniband/hw/mlx5/qp.c +6 -6
@@ -2023,7 +2023,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,if (init_attr->rwq_ind_tbl) {if (!udata) -return -ENOSYS ; +return -EOPNOTSUPP ; err =create_rss_raw_qp_tir (dev, qp, pd, init_attr, udata);return err;
@@ -2032,7 +2032,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,if (init_attr->create_flags &IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK ) {if (!MLX5_CAP_GEN (mdev, block_lb_mc)) {mlx5_ib_dbg (dev,"block multicast loopback isn't supported\n" ); -return -EINVAL ; +return -EOPNOTSUPP ; }else { qp->flags |=MLX5_IB_QP_BLOCK_MULTICAST_LOOPBACK ; }
@@ -2044,7 +2044,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd, IB_QP_CREATE_MANAGED_RECV)) {if (!MLX5_CAP_GEN (mdev, cd)) {mlx5_ib_dbg (dev,"cross-channel isn't supported\n" ); -return -EINVAL ; +return -EOPNOTSUPP ; }if (init_attr->create_flags &IB_QP_CREATE_CROSS_CHANNEL ) qp->flags |=MLX5_IB_QP_CROSS_CHANNEL ;
@@ -2693,7 +2693,7 @@ struct ib_qp *mlx5_ib_create_qp(struct ib_pd *pd,if (init_attr->qp_type ==IB_QPT_RAW_PACKET ) {if (!ucontext) {mlx5_ib_dbg (dev,"Raw Packet QP is not supported for kernel consumers\n" ); -return ERR_PTR (-EINVAL ); + return ERR_PTR(-EOPNOTSUPP; }else if (!ucontext->cqe_version) {mlx5_ib_dbg (dev,"Raw Packet QP is only supported for CQE version > 0\n" );return ERR_PTR (-EINVAL );
@@ -2735,7 +2735,7 @@ struct ib_qp *mlx5_ib_create_qp(struct ib_pd *pd,case IB_QPT_XRC_INI :if (!MLX5_CAP_GEN (dev->mdev, xrc)) {mlx5_ib_dbg (dev,"XRC not supported\n" ); -return ERR_PTR (-ENOSYS ); +return ERR_PTR (-EOPNOTSUPP ); } init_attr->recv_cq =NULL ;if (init_attr->qp_type ==IB_QPT_XRC_TGT ) {
@@ -2789,7 +2789,7 @@ struct ib_qp *mlx5_ib_create_qp(struct ib_pd *pd,mlx5_ib_dbg (dev,"unsupported qp type %d\n" , init_attr->qp_type);/* Don't support raw QPs */ -return ERR_PTR (-EINVAL ); +return ERR_PTR (-EOPNOTSUPP ); }if (verbs_init_attr->qp_type ==IB_QPT_DRIVER )