diff mbox series

[rdma-core,1/2] providers/irdma: Report correct WC errors

Message ID 20211129225446.691-2-sindhu.devale@intel.com (mailing list archive)
State Changes Requested
Delegated to: Leon Romanovsky
Headers show
Series Validate input and fix return code | expand

Commit Message

Sindhu Devale Nov. 29, 2021, 10:54 p.m. UTC
From: "Sindhu, Devale" <sindhu.devale@intel.com>

Return specific WC errors for certain type of error
events as opposed to a generic IBV_WC_FATAL_ERR.

In particular,

Return IBV_WC_MW_BIND_ERR for memory window
related asynchronous events.

Return IBV_WC_REM_INV_REQ_ERR for errors which is
detected when the remote side detects an operation
outside of the established use for the transport.

Return IBV_WC_RETRY_EXC_ERR when transport retry
counter is exceeded.

Fixes: 14a0fc824f16 ("rdma-core/irdma: Implement device supported verb APIs")
Signed-off-by: Sindhu, Devale <sindhu.devale@intel.com>
---
 providers/irdma/uverbs.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/providers/irdma/uverbs.c b/providers/irdma/uverbs.c
index edd8821f..c8222d14 100644
--- a/providers/irdma/uverbs.c
+++ b/providers/irdma/uverbs.c
@@ -556,6 +556,12 @@  static enum ibv_wc_status irdma_flush_err_to_ib_wc_status(enum irdma_flush_opcod
 		return IBV_WC_LOC_LEN_ERR;
 	case FLUSH_GENERAL_ERR:
 		return IBV_WC_WR_FLUSH_ERR;
+	case FLUSH_MW_BIND_ERR:
+		return IBV_WC_MW_BIND_ERR;
+	case FLUSH_REM_INV_REQ_ERR:
+		return IBV_WC_REM_INV_REQ_ERR;
+	case FLUSH_RETRY_EXC_ERR:
+		return IBV_WC_RETRY_EXC_ERR;
 	case FLUSH_FATAL_ERR:
 	default:
 		return IBV_WC_FATAL_ERR;