NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_sta_event.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 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 
14 #ifndef DOCA_STA_EVENT_H_
15 #define DOCA_STA_EVENT_H_
16 
17 #include <stdint.h>
18 #include <stdbool.h>
19 
20 #include <doca_error.h>
21 #include <doca_types.h>
22 
23 #include <doca_sta_handle.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct doca_sta;
30 struct doca_sta_io;
31 struct dev_sta_event;
32 
33 struct doca_sta_event_transport_err;
34 
49 typedef void (*doca_sta_event_transport_err_cb_t)(const struct doca_sta_event_transport_err *event,
50  union doca_data user_data);
51 
53 doca_error_t doca_sta_event_transport_err_get_qp_handle(const struct doca_sta_event_transport_err *event,
54  const struct doca_sta_qp_handle **qp_handle);
55 
57 doca_error_t doca_sta_event_transport_err_get_operation(const struct doca_sta_event_transport_err *event,
58  uint32_t *operation);
59 
61 doca_error_t doca_sta_event_transport_err_get_syndrome(const struct doca_sta_event_transport_err *event,
62  uint32_t *syndrome);
63 
65 doca_error_t doca_sta_event_transport_err_get_vendor_syndrome(const struct doca_sta_event_transport_err *event,
66  uint32_t *vendor_syndrome);
67 
71  union doca_data user_data);
72 
73 struct doca_sta_event_be_timeout;
74 
75 typedef void (*doca_sta_event_be_timeout_cb_t)(const struct doca_sta_event_be_timeout *event,
76  union doca_data user_data);
77 
81  union doca_data user_data);
82 
84 doca_error_t doca_sta_event_be_timeout_get_be_handle(const struct doca_sta_event_be_timeout *event,
85  const struct doca_sta_be_handle **be_handle);
86 
88 doca_error_t doca_sta_event_be_timeout_get_be_queue_handle(const struct doca_sta_event_be_timeout *event,
89  const struct doca_sta_be_q_handle **be_queue_handle);
90 
91 struct doca_sta_event_eu_err;
92 
93 typedef void (*doca_sta_event_eu_err_cb_t)(const struct doca_sta_event_eu_err *event, union doca_data user_data);
94 
98  union doca_data user_data);
99 
101 doca_error_t doca_sta_event_eu_err_is_fatal_error(const struct doca_sta_event_eu_err *event, bool *is_fatal_error);
102 
103 /* Relevant for non-fatal errors only */
105 doca_error_t doca_sta_event_eu_err_get_eu_handle(const struct doca_sta_event_eu_err *event,
106  const struct doca_sta_eu_handle **eu_handle);
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif /* DOCA_STA_EVENT_H_ */
void(* doca_sta_event_eu_err_cb_t)(const struct doca_sta_event_eu_err *event, union doca_data user_data)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_be_timeout_get_be_queue_handle(const struct doca_sta_event_be_timeout *event, const struct doca_sta_be_q_handle **be_queue_handle)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_eu_err_is_fatal_error(const struct doca_sta_event_eu_err *event, bool *is_fatal_error)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_be_timeout_register_cb(struct doca_sta *sta, doca_sta_event_be_timeout_cb_t event_cb, union doca_data user_data)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_eu_err_get_eu_handle(const struct doca_sta_event_eu_err *event, const struct doca_sta_eu_handle **eu_handle)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_transport_err_get_operation(const struct doca_sta_event_transport_err *event, uint32_t *operation)
void(* doca_sta_event_transport_err_cb_t)(const struct doca_sta_event_transport_err *event, union doca_data user_data)
Function to execute on STA event notification.
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_transport_err_get_syndrome(const struct doca_sta_event_transport_err *event, uint32_t *syndrome)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_be_timeout_get_be_handle(const struct doca_sta_event_be_timeout *event, const struct doca_sta_be_handle **be_handle)
void(* doca_sta_event_be_timeout_cb_t)(const struct doca_sta_event_be_timeout *event, union doca_data user_data)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_eu_err_register_cb(struct doca_sta *sta, doca_sta_event_eu_err_cb_t event_cb, union doca_data user_data)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_transport_err_get_vendor_syndrome(const struct doca_sta_event_transport_err *event, uint32_t *vendor_syndrome)
DOCA_EXPERIMENTAL doca_error_t doca_sta_event_transport_err_get_qp_handle(const struct doca_sta_event_transport_err *event, const struct doca_sta_qp_handle **qp_handle)
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_event_transport_err_register_cb(struct doca_sta_io *sta_io, doca_sta_event_transport_err_cb_t event_cb, union doca_data user_data)
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
enum doca_error doca_error_t
DOCA API return codes.
Convenience type for representing opaque data.
Definition: doca_types.h:56