Skip to content

Commit

Permalink
providers/efa: Set remote access error for bad address status
Browse files Browse the repository at this point in the history
EFA returns bad address completion status when RKEY is not registered or
does not match remote IOVA. Fix the status description and match it to
the appropriate remote access verbs error.

Reviewed-by: Michael Margolin <[email protected]>
Reviewed-by: Yonatan Nachum <[email protected]>
Signed-off-by: Daniel Kranzdorf <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
  • Loading branch information
dkkranz authored and mrgolin committed May 2, 2024
1 parent 3be5661 commit 18e88e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 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 @@ -42,7 +42,7 @@ enum efa_io_comp_status {
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 Down
1 change: 1 addition & 0 deletions providers/efa/verbs.c
Expand Up @@ -469,6 +469,7 @@ 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;
default:
return IBV_WC_GENERAL_ERR;
}
Expand Down

0 comments on commit 18e88e8

Please sign in to comment.