Re: [PATCH 2/2] RDMA/rxe: Add check for supported QP types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
>  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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux