linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shiraz Saleem <shiraz.saleem@intel.com>
To: dledford@redhat.com, jgg@nvidia.com
Cc: linux-rdma@vger.kernel.org,
	Sindhu Devale <sindhu.devale@intel.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>
Subject: [PATCH rdma-rc 4/4] RDMA/irdma: Report correct WC error when there are MW bind errors
Date: Thu, 16 Sep 2021 14:12:22 -0500	[thread overview]
Message-ID: <20210916191222.824-5-shiraz.saleem@intel.com> (raw)
In-Reply-To: <20210916191222.824-1-shiraz.saleem@intel.com>

From: Sindhu Devale <sindhu.devale@intel.com>

Report the correct WC error when MW bind error related asynchronous
events are generated by HW.

Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
---
 drivers/infiniband/hw/irdma/hw.c    | 5 +++++
 drivers/infiniband/hw/irdma/user.h  | 1 +
 drivers/infiniband/hw/irdma/verbs.c | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
index cb9a8e24e3b7..7de525a5ccf8 100644
--- a/drivers/infiniband/hw/irdma/hw.c
+++ b/drivers/infiniband/hw/irdma/hw.c
@@ -179,6 +179,11 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp,
 	case IRDMA_AE_LLP_TOO_MANY_RETRIES:
 		qp->flush_code = FLUSH_RETRY_EXC_ERR;
 		break;
+	case IRDMA_AE_AMP_MWBIND_INVALID_RIGHTS:
+	case IRDMA_AE_AMP_MWBIND_BIND_DISABLED:
+	case IRDMA_AE_AMP_MWBIND_INVALID_BOUNDS:
+		qp->flush_code = FLUSH_MW_BIND_ERR;
+		break;
 	default:
 		qp->flush_code = FLUSH_FATAL_ERR;
 		break;
diff --git a/drivers/infiniband/hw/irdma/user.h b/drivers/infiniband/hw/irdma/user.h
index 267102d1049d..3dcbb1fbf2c6 100644
--- a/drivers/infiniband/hw/irdma/user.h
+++ b/drivers/infiniband/hw/irdma/user.h
@@ -103,6 +103,7 @@ enum irdma_flush_opcode {
 	FLUSH_LOC_LEN_ERR,
 	FLUSH_FATAL_ERR,
 	FLUSH_RETRY_EXC_ERR,
+	FLUSH_MW_BIND_ERR,
 };
 
 enum irdma_cmpl_status {
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index c7e129ee74d0..7110ebf834f9 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -3354,6 +3354,8 @@ static enum ib_wc_status irdma_flush_err_to_ib_wc_status(enum irdma_flush_opcode
 		return IB_WC_WR_FLUSH_ERR;
 	case FLUSH_RETRY_EXC_ERR:
 		return IB_WC_RETRY_EXC_ERR;
+	case FLUSH_MW_BIND_ERR:
+		return IB_WC_MW_BIND_ERR;
 	case FLUSH_FATAL_ERR:
 	default:
 		return IB_WC_FATAL_ERR;
-- 
2.27.0


  parent reply	other threads:[~2021-09-16 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 19:12 [PATCH rdma-rc 0/4] irdma fixes Shiraz Saleem
2021-09-16 19:12 ` [PATCH rdma-rc 1/4] RDMA/irdma: Skip CQP ring during a reset Shiraz Saleem
2021-09-16 19:12 ` [PATCH rdma-rc 2/4] RDMA/irdma: Validate number of CQ entries on create CQ Shiraz Saleem
2021-09-16 19:12 ` [PATCH rdma-rc 3/4] RDMA/irdma: Report correct WC error when transport retry counter is exceeded Shiraz Saleem
2021-09-16 19:12 ` Shiraz Saleem [this message]
2021-09-20 17:24 ` [PATCH rdma-rc 0/4] irdma fixes Jason Gunthorpe

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=20210916191222.824-5-shiraz.saleem@intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sindhu.devale@intel.com \
    --subject='Re: [PATCH rdma-rc 4/4] RDMA/irdma: Report correct WC error when there are MW bind errors' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).