All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weihang Li <liweihang@huawei.com>
To: <dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: [PATCH for-next 3/9] RDMA/hns: Add interception for resizing SRQs
Date: Mon, 7 Sep 2020 21:36:42 +0800	[thread overview]
Message-ID: <1599485808-29940-4-git-send-email-liweihang@huawei.com> (raw)
In-Reply-To: <1599485808-29940-1-git-send-email-liweihang@huawei.com>

From: Yangyang Li <liyangyang20@huawei.com>

HIP08 doesn't support modifying the maximum number of outstanding WR in an
SRQ. However, the driver does not return a failure message, and users may
mistakenly think that the resizing is executed successfully. So the driver
needs to intercept this operation.

Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 9a9639b..4a88d41 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -5044,6 +5044,10 @@ static int hns_roce_v2_modify_srq(struct ib_srq *ibsrq,
 	struct hns_roce_cmd_mailbox *mailbox;
 	int ret;
 
+	/* Resizing SRQs is not supported yet */
+	if (srq_attr_mask & IB_SRQ_MAX_WR)
+		return -EINVAL;
+
 	if (srq_attr_mask & IB_SRQ_LIMIT) {
 		if (srq_attr->srq_limit >= srq->wqe_cnt)
 			return -EINVAL;
-- 
2.8.1


  parent reply	other threads:[~2020-09-07 17:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 13:36 [PATCH for-next 0/9] RDMA/hns: Misc Updates Weihang Li
2020-09-07 13:36 ` [PATCH for-next 1/9] RDMA/hns: Refactor process about opcode in post_send() Weihang Li
2020-09-09  2:39   ` Lang Cheng
2020-09-09  3:41     ` liweihang
2020-09-07 13:36 ` [PATCH for-next 2/9] RDMA/hns: Add type check in get/set hw field Weihang Li
2020-09-07 13:36 ` Weihang Li [this message]
2020-09-07 13:36 ` [PATCH for-next 4/9] RDMA/hns: Correct typo of hns_roce_create_cq() Weihang Li
2020-09-07 13:36 ` [PATCH for-next 5/9] RDMA/hns: Add check for the validity of sl configuration Weihang Li
2020-09-07 13:36 ` [PATCH for-next 6/9] RDMA/hns: Solve the overflow of the calc_pg_sz() Weihang Li
2020-09-07 13:36 ` [PATCH for-next 7/9] RDMA/hns: Fix the wrong value of rnr_retry when querying qp Weihang Li
2020-09-07 13:36 ` [PATCH for-next 8/9] RDMA/hns: Fix configuration of ack_req_freq in QPC Weihang Li
2020-09-07 13:36 ` [PATCH for-next 9/9] RDMA/hns: Fix missing sq_sig_type when querying QP Weihang Li

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=1599485808-29940-4-git-send-email-liweihang@huawei.com \
    --to=liweihang@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.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.