Commit d3bdcd59 authored by Sindhu Devale's avatar Sindhu Devale Committed by Jason Gunthorpe

RDMA/irdma: Report correct WC error when transport retry counter is exceeded

When the retry counter exceeds, as the remote QP didn't send any Ack or
Nack an asynchronous event (AE) for too many retries is generated. Add
code to handle the AE and set the correct IB WC error code
IB_WC_RETRY_EXC_ERR.

Fixes: b48c24c2 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20210916191222.824-4-shiraz.saleem@intel.comSigned-off-by: default avatarSindhu Devale <sindhu.devale@intel.com>
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent f4475f24
...@@ -176,6 +176,9 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp, ...@@ -176,6 +176,9 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp,
case IRDMA_AE_LLP_RECEIVED_MPA_CRC_ERROR: case IRDMA_AE_LLP_RECEIVED_MPA_CRC_ERROR:
qp->flush_code = FLUSH_GENERAL_ERR; qp->flush_code = FLUSH_GENERAL_ERR;
break; break;
case IRDMA_AE_LLP_TOO_MANY_RETRIES:
qp->flush_code = FLUSH_RETRY_EXC_ERR;
break;
default: default:
qp->flush_code = FLUSH_FATAL_ERR; qp->flush_code = FLUSH_FATAL_ERR;
break; break;
......
...@@ -102,6 +102,7 @@ enum irdma_flush_opcode { ...@@ -102,6 +102,7 @@ enum irdma_flush_opcode {
FLUSH_REM_OP_ERR, FLUSH_REM_OP_ERR,
FLUSH_LOC_LEN_ERR, FLUSH_LOC_LEN_ERR,
FLUSH_FATAL_ERR, FLUSH_FATAL_ERR,
FLUSH_RETRY_EXC_ERR,
}; };
enum irdma_cmpl_status { enum irdma_cmpl_status {
......
...@@ -3352,6 +3352,8 @@ static enum ib_wc_status irdma_flush_err_to_ib_wc_status(enum irdma_flush_opcode ...@@ -3352,6 +3352,8 @@ static enum ib_wc_status irdma_flush_err_to_ib_wc_status(enum irdma_flush_opcode
return IB_WC_LOC_LEN_ERR; return IB_WC_LOC_LEN_ERR;
case FLUSH_GENERAL_ERR: case FLUSH_GENERAL_ERR:
return IB_WC_WR_FLUSH_ERR; return IB_WC_WR_FLUSH_ERR;
case FLUSH_RETRY_EXC_ERR:
return IB_WC_RETRY_EXC_ERR;
case FLUSH_FATAL_ERR: case FLUSH_FATAL_ERR:
default: default:
return IB_WC_FATAL_ERR; return IB_WC_FATAL_ERR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment