From: Shiraz Saleem <shiraz.saleem@intel.com>
To: jgg@nvidia.com, leon@kernel.org
Cc: linux-rdma@vger.kernel.org,
Sindhu-Devale <sindhu.devale@intel.com>,
Shiraz Saleem <shiraz.saleem@intel.com>
Subject: [PATCH for-rc 3/5] RDMA/irdma: Return correct WC error for bind operation failure
Date: Tue, 6 Sep 2022 17:32:42 -0500 [thread overview]
Message-ID: <20220906223244.1119-4-shiraz.saleem@intel.com> (raw)
In-Reply-To: <20220906223244.1119-1-shiraz.saleem@intel.com>
From: Sindhu-Devale <sindhu.devale@intel.com>
When a QP and a MR on a local host are in different PDs, the HW generates
an asynchronous event (AE). The same AE is generated when a QP and a MW
are in different PDs during a bind operation. Return the more appropriate
IBV_WC_MW_BIND_ERR for the latter case by checking the OP type from the
CQE in error.
Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries")
Signed-off-by: Sindhu-Devale <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
---
drivers/infiniband/hw/irdma/uk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index daeab5d..d003ad8 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -1005,6 +1005,7 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
int ret_code;
bool move_cq_head = true;
u8 polarity;
+ u8 op_type;
bool ext_valid;
__le64 *ext_cqe;
@@ -1187,7 +1188,6 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
do {
__le64 *sw_wqe;
u64 wqe_qword;
- u8 op_type;
u32 tail;
tail = qp->sq_ring.tail;
@@ -1204,6 +1204,8 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
break;
}
} while (1);
+ if (op_type == IRDMA_OP_TYPE_BIND_MW && info->minor_err == FLUSH_PROT_ERR)
+ info->minor_err = FLUSH_MW_BIND_ERR;
qp->sq_flush_seen = true;
if (!IRDMA_RING_MORE_WORK(qp->sq_ring))
qp->sq_flush_complete = true;
--
1.8.3.1
next prev parent reply other threads:[~2022-09-06 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 22:32 [PATCH for-rc 0/5] irdma for-rc updates 9-6-2022 Shiraz Saleem
2022-09-06 22:32 ` [PATCH for-rc 1/5] RDMA/irdma: Report the correct max cqes from query device Shiraz Saleem
2022-09-06 22:32 ` [PATCH for-rc 2/5] RDMA/irdma: Return error on MR deregister CQP failure Shiraz Saleem
2022-09-06 22:32 ` Shiraz Saleem [this message]
2022-09-06 22:32 ` [PATCH for-rc 4/5] RDMA/irdma: Use s/g array in post send only when its valid Shiraz Saleem
2022-09-06 22:32 ` [PATCH for-rc 5/5] RDMA/irdma: Report RNR NAK generation in device caps Shiraz Saleem
2022-09-07 8:29 ` [PATCH for-rc 0/5] irdma for-rc updates 9-6-2022 Leon Romanovsky
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=20220906223244.1119-4-shiraz.saleem@intel.com \
--to=shiraz.saleem@intel.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sindhu.devale@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox