All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: <linux-rdma@vger.kernel.org>, <leon@kernel.org>
Subject: Re: [PATCH 2/2] RDMA/rxe: Add check for supported QP types
Date: Tue, 12 Jan 2021 16:15:28 -0400	[thread overview]
Message-ID: <20210112201528.GA21931@nvidia.com> (raw)
In-Reply-To: <20201216071755.149449-2-yangx.jy@cn.fujitsu.com>

On Wed, Dec 16, 2020 at 03:17:55PM +0800, Xiao Yang wrote:
> 1) Current rdma_rxe only supports five QP types which always sets recv_cq.
> 2) INI QP doesn't set recv_cq(NULL) so creating INI QP over softroce
>    triggers 'missing cq' warning.
> 
> Avoid the warning by checking supported QP type.
> 
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
>  drivers/infiniband/sw/rxe/rxe_qp.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
> index 656a5b4be847..65c8df812aeb 100644
> +++ b/drivers/infiniband/sw/rxe/rxe_qp.c
> @@ -62,6 +62,17 @@ int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init)
>  	struct rxe_port *port;
>  	int port_num = init->port_num;
>  
> +	switch(init->qp_type) {
> +	case IB_QPT_SMI:
> +	case IB_QPT_GSI:
> +	case IB_QPT_RC:
> +	case IB_QPT_UC:
> +	case IB_QPT_UD:
> +		break;
> +	default:
> +		return -EOPNOTSUPP;
> +	}

This does make sense, but not really because of recv_cq - rxe doesn't
support other QP types at all and should return an error when making
an XRC anything

So applied to for-next

Thanks,
Jason

  reply	other threads:[~2021-01-12 21:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  7:17 [PATCH 1/2] RDMA/uverbs: Don't set rcq if qp_type is IB_QPT_XRC_INI Xiao Yang
2020-12-16  7:17 ` [PATCH 2/2] RDMA/rxe: Add check for supported QP types Xiao Yang
2021-01-12 20:15   ` Jason Gunthorpe [this message]
2021-01-12 20:09 ` [PATCH 1/2] RDMA/uverbs: Don't set rcq if qp_type is IB_QPT_XRC_INI Jason Gunthorpe
2021-01-14  8:58   ` Xiao Yang
2021-01-15 19:23     ` Jason Gunthorpe
2021-01-18  7:58       ` Xiao Yang
2021-01-21 17:05 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210112201528.GA21931@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yangx.jy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.