]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
RDMA/irdma: Report correct WC error when transport retry counter is exceeded
authorSindhu Devale <sindhu.devale@intel.com>
Thu, 16 Sep 2021 19:12:21 +0000 (14:12 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 20 Sep 2021 17:13:23 +0000 (14:13 -0300)
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: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20210916191222.824-4-shiraz.saleem@intel.com
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/hw.c
drivers/infiniband/hw/irdma/user.h
drivers/infiniband/hw/irdma/verbs.c

index 33c06a3a4f63e3736504aabd268cafed074cd7d2..cb9a8e24e3b7b781576bbc236373712deea5d2ea 100644 (file)
@@ -176,6 +176,9 @@ static void irdma_set_flush_fields(struct irdma_sc_qp *qp,
        case IRDMA_AE_LLP_RECEIVED_MPA_CRC_ERROR:
                qp->flush_code = FLUSH_GENERAL_ERR;
                break;
+       case IRDMA_AE_LLP_TOO_MANY_RETRIES:
+               qp->flush_code = FLUSH_RETRY_EXC_ERR;
+               break;
        default:
                qp->flush_code = FLUSH_FATAL_ERR;
                break;
index ff705f323233375a5ea150adb8daa2797e1f224f..267102d1049d393ce5e4cc1e53837e246089a06b 100644 (file)
@@ -102,6 +102,7 @@ enum irdma_flush_opcode {
        FLUSH_REM_OP_ERR,
        FLUSH_LOC_LEN_ERR,
        FLUSH_FATAL_ERR,
+       FLUSH_RETRY_EXC_ERR,
 };
 
 enum irdma_cmpl_status {
index 23c47482c749fd9d4c1152dc550bb36a92e9cdd5..c7e129ee74d0f96e451741d9f6e6c1b3556197bf 100644 (file)
@@ -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;
        case FLUSH_GENERAL_ERR:
                return IB_WC_WR_FLUSH_ERR;
+       case FLUSH_RETRY_EXC_ERR:
+               return IB_WC_RETRY_EXC_ERR;
        case FLUSH_FATAL_ERR:
        default:
                return IB_WC_FATAL_ERR;