Skip to content

Commit

Permalink
Merge pull request #1456 from amzn/comp-status
Browse files Browse the repository at this point in the history
Improve EFA work completion statuses
  • Loading branch information
rleon committed May 8, 2024
2 parents c6ff77b + ff5f993 commit df84cc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions providers/efa/efa_io_defs.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved.
* Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved.
*/

#ifndef _EFA_IO_H_
Expand Down Expand Up @@ -34,15 +34,15 @@ enum efa_io_comp_status {
EFA_IO_COMP_STATUS_FLUSHED = 1,
/* Internal QP error */
EFA_IO_COMP_STATUS_LOCAL_ERROR_QP_INTERNAL_ERROR = 2,
/* Bad operation type */
EFA_IO_COMP_STATUS_LOCAL_ERROR_INVALID_OP_TYPE = 3,
/* Unsupported operation */
EFA_IO_COMP_STATUS_LOCAL_ERROR_UNSUPPORTED_OP = 3,
/* Bad AH */
EFA_IO_COMP_STATUS_LOCAL_ERROR_INVALID_AH = 4,
/* LKEY not registered or does not match IOVA */
EFA_IO_COMP_STATUS_LOCAL_ERROR_INVALID_LKEY = 5,
/* Message too long */
EFA_IO_COMP_STATUS_LOCAL_ERROR_BAD_LENGTH = 6,
/* Destination ENI is down or does not run EFA */
/* RKEY not registered or does not match remote IOVA */
EFA_IO_COMP_STATUS_REMOTE_ERROR_BAD_ADDRESS = 7,
/* Connection was reset by remote side */
EFA_IO_COMP_STATUS_REMOTE_ERROR_ABORT = 8,
Expand All @@ -56,6 +56,8 @@ enum efa_io_comp_status {
EFA_IO_COMP_STATUS_REMOTE_ERROR_BAD_STATUS = 12,
/* Unresponsive remote - detected locally */
EFA_IO_COMP_STATUS_LOCAL_ERROR_UNRESP_REMOTE = 13,
/* No valid AH at remote side (required for RDMA operations) */
EFA_IO_COMP_STATUS_REMOTE_ERROR_UNKNOWN_PEER = 14,
};

struct efa_io_tx_meta_desc {
Expand Down
5 changes: 4 additions & 1 deletion providers/efa/verbs.c
Expand Up @@ -449,7 +449,7 @@ static enum ibv_wc_status to_ibv_status(enum efa_io_comp_status status)
case EFA_IO_COMP_STATUS_FLUSHED:
return IBV_WC_WR_FLUSH_ERR;
case EFA_IO_COMP_STATUS_LOCAL_ERROR_QP_INTERNAL_ERROR:
case EFA_IO_COMP_STATUS_LOCAL_ERROR_INVALID_OP_TYPE:
case EFA_IO_COMP_STATUS_LOCAL_ERROR_UNSUPPORTED_OP:
case EFA_IO_COMP_STATUS_LOCAL_ERROR_INVALID_AH:
return IBV_WC_LOC_QP_OP_ERR;
case EFA_IO_COMP_STATUS_LOCAL_ERROR_INVALID_LKEY:
Expand All @@ -469,6 +469,9 @@ static enum ibv_wc_status to_ibv_status(enum efa_io_comp_status status)
case EFA_IO_COMP_STATUS_LOCAL_ERROR_UNRESP_REMOTE:
return IBV_WC_RESP_TIMEOUT_ERR;
case EFA_IO_COMP_STATUS_REMOTE_ERROR_BAD_ADDRESS:
return IBV_WC_REM_ACCESS_ERR;
case EFA_IO_COMP_STATUS_REMOTE_ERROR_UNKNOWN_PEER:
return IBV_WC_REM_OP_ERR;
default:
return IBV_WC_GENERAL_ERR;
}
Expand Down

0 comments on commit df84cc4

Please sign in to comment.