NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_error.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
24 #ifndef DOCA_ERROR_H_
25 #define DOCA_ERROR_H_
26 
27 #include <doca_compat.h>
28 #include <doca_common_defines.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
37 typedef enum doca_error {
70 
76 #define DOCA_IS_ERROR(r) doca_unlikely((r) != DOCA_SUCCESS)
77 
83 #define DOCA_ERROR_PROPAGATE(r, t) \
84  do { \
85  if (r == DOCA_SUCCESS) \
86  r = t; \
87  } while (0)
88 
102 
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
122 #endif /* DOCA_ERROR_H_ */
#define DOCA_STABLE
To set a Symbol (or specifically a function) as stable API, i.e. it won't be changed.
Definition: doca_compat.h:96
enum doca_error doca_error_t
DOCA API return codes.
doca_error
DOCA API return codes.
Definition: doca_error.h:37
DOCA_STABLE const char * doca_error_get_name(doca_error_t error)
Returns the string representation of an error code name.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_ERROR_TIME_OUT
Definition: doca_error.h:47
@ DOCA_ERROR_CONNECTION_ABORTED
Definition: doca_error.h:50
@ DOCA_ERROR_INVALID_VALUE
Definition: doca_error.h:44
@ DOCA_ERROR_TOO_BIG
Definition: doca_error.h:65
@ DOCA_ERROR_UNKNOWN
Definition: doca_error.h:39
@ DOCA_ERROR_INITIALIZATION
Definition: doca_error.h:46
@ DOCA_ERROR_IN_USE
Definition: doca_error.h:41
@ DOCA_ERROR_UNEXPECTED
Definition: doca_error.h:60
@ DOCA_ERROR_NO_LOCK
Definition: doca_error.h:53
@ DOCA_ERROR_UNSUPPORTED_VERSION
Definition: doca_error.h:57
@ DOCA_ERROR_OPERATING_SYSTEM
Definition: doca_error.h:58
@ DOCA_ERROR_NOT_FOUND
Definition: doca_error.h:54
@ DOCA_ERROR_BAD_STATE
Definition: doca_error.h:56
@ DOCA_ERROR_NOT_SUPPORTED
Definition: doca_error.h:42
@ DOCA_ERROR_AUTHENTICATION
Definition: doca_error.h:66
@ DOCA_ERROR_SKIPPED
Definition: doca_error.h:68
@ DOCA_ERROR_IO_FAILED
Definition: doca_error.h:55
@ DOCA_ERROR_AGAIN
Definition: doca_error.h:43
@ DOCA_SUCCESS
Definition: doca_error.h:38
@ DOCA_ERROR_BAD_CONFIG
Definition: doca_error.h:67
@ DOCA_ERROR_FULL
Definition: doca_error.h:62
@ DOCA_ERROR_CONNECTION_INPROGRESS
Definition: doca_error.h:51
@ DOCA_ERROR_NOT_CONNECTED
Definition: doca_error.h:52
@ DOCA_ERROR_SHUTDOWN
Definition: doca_error.h:48
@ DOCA_ERROR_NO_MEMORY
Definition: doca_error.h:45
@ DOCA_ERROR_IN_PROGRESS
Definition: doca_error.h:64
@ DOCA_ERROR_NOT_PERMITTED
Definition: doca_error.h:40
@ DOCA_ERROR_DRIVER
Definition: doca_error.h:59
@ DOCA_ERROR_CONNECTION_RESET
Definition: doca_error.h:49
@ DOCA_ERROR_ALREADY_EXIST
Definition: doca_error.h:61
@ DOCA_ERROR_EMPTY
Definition: doca_error.h:63