aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns/hns_roce_main.c
diff options
context:
space:
mode:
authorLijun Ou <oulijun@huawei.com>2018-11-24 16:49:19 +0800
committerJason Gunthorpe <jgg@mellanox.com>2018-12-05 07:59:13 -0700
commitd16da11992d44fb54d99b71408b201311d81e0af (patch)
treeb812ac53789d4ccf8d1f99aae3f2cb1bdb2445d6 /drivers/infiniband/hw/hns/hns_roce_main.c
parentMerge branch 'mlx5-devx' into wip/dl-for-next (diff)
downloadlinux-dev-d16da11992d44fb54d99b71408b201311d81e0af.tar.xz
linux-dev-d16da11992d44fb54d99b71408b201311d81e0af.zip
RDMA/hns: Eanble SRQ capacity for hip08
This patch configures the flags for enabling the SRQ(Share Receive Queue) capacity as well as update the verb of querying device for setting srq specifications. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 1b3ee514f2ef..f6f288f36e04 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -220,6 +220,11 @@ static int hns_roce_query_device(struct ib_device *ib_dev,
IB_ATOMIC_HCA : IB_ATOMIC_NONE;
props->max_pkeys = 1;
props->local_ca_ack_delay = hr_dev->caps.local_ca_ack_delay;
+ if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) {
+ props->max_srq = hr_dev->caps.max_srqs;
+ props->max_srq_wr = hr_dev->caps.max_srq_wrs;
+ props->max_srq_sge = hr_dev->caps.max_srq_sges;
+ }
return 0;
}