30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From 0adf3f4bef9346c9cd3d1ecb7af4ee8f27d3b48a Mon Sep 17 00:00:00 2001
|
|
From: Lijun Ou <oulijun@huawei.com>
|
|
Date: Wed, 12 Dec 2018 17:49:07 +0800
|
|
Subject: [PATCH 28/31] RDMA/hns: Bugfix for the scene without receiver queue
|
|
Origin: https://git.kernel.org/linus/4d103905eb1e4f14cb62fcf962c9d35da7005dea
|
|
|
|
In some application scenario, the user could not have receive queue when
|
|
run rdma write or read operation.
|
|
|
|
Signed-off-by: Lijun Ou <oulijun@huawei.com>
|
|
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
|
|
---
|
|
drivers/infiniband/hw/hns/hns_roce_qp.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
Index: linux/drivers/infiniband/hw/hns/hns_roce_qp.c
|
|
===================================================================
|
|
--- linux.orig/drivers/infiniband/hw/hns/hns_roce_qp.c
|
|
+++ linux/drivers/infiniband/hw/hns/hns_roce_qp.c
|
|
@@ -503,7 +503,8 @@ static int hns_roce_qp_has_sq(struct ib_
|
|
static int hns_roce_qp_has_rq(struct ib_qp_init_attr *attr)
|
|
{
|
|
if (attr->qp_type == IB_QPT_XRC_INI ||
|
|
- attr->qp_type == IB_QPT_XRC_TGT || attr->srq)
|
|
+ attr->qp_type == IB_QPT_XRC_TGT || attr->srq ||
|
|
+ !attr->cap.max_recv_wr)
|
|
return 0;
|
|
|
|
return 1;
|