| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Modules | |
| DOCA Telemetry NetFlow | |
Macros | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_BOOL "bool" |
| DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_{} are data types that are used to create doca_telemetry_exporter_field;. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_CHAR "char" |
| DOCA telemetry char type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_SHORT "short" |
| DOCA telemetry short type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT "int" |
| DOCA telemetry in type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_LONG "long" |
| DOCA telemetry long type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_LONGLONG "long long" |
| DOCA telemetry longlong type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UCHAR "unsigned char" |
| DOCA telemetry uchar type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_USHORT "unsigned short" |
| DOCA telemetry ushort type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT "unsigned int" |
| DOCA telemetry uint type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_ULONG "unsigned long" |
| DOCA telemetry ulong type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_ULONGLONG "unsigned long long" |
| DOCA telemetry ulonglong type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_FLOAT "float" |
| DOCA telemetry float type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_DOUBLE "double" |
| DOCA telemetry double type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT8 "int8_t" |
| DOCA telemetry int8 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT16 "int16_t" |
| DOCA telemetry int16 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT32 "int32_t" |
| DOCA telemetry int32 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT64 "int64_t" |
| DOCA telemetry int64 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT8 "uint8_t" |
| DOCA telemetry uint8 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT16 "uint16_t" |
| DOCA telemetry uint16 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT32 "uint32_t" |
| DOCA telemetry uint32 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT64 "uint64_t" |
| DOCA telemetry uint64 type. More... | |
| #define | DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_TIMESTAMP DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT64 |
| DOCA telemetry timestamp type. More... | |
| #define | DOCA_GUID_SIZE 16 |
| DOCA GUID size. More... | |
Typedefs | |
| typedef enum doca_telemetry_exporter_ipc_status | doca_telemetry_exporter_ipc_status_t |
| DOCA telemetry IPC status. More... | |
| typedef uint8_t | doca_telemetry_exporter_type_index_t |
| DOCA schema field type index. More... | |
| typedef uint64_t | doca_telemetry_exporter_timestamp_t |
| DOCA schema type index type. More... | |
| typedef uint8_t | doca_guid_t[DOCA_GUID_SIZE] |
| DOCA GUID type. More... | |
Enumerations | |
| enum | doca_telemetry_exporter_ipc_status { DOCA_TELEMETRY_EXPORTER_IPC_STATUS_FAILED = -1 , DOCA_TELEMETRY_EXPORTER_IPC_STATUS_CONNECTED , DOCA_TELEMETRY_EXPORTER_IPC_STATUS_DISABLED } |
| DOCA telemetry IPC status. More... | |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_init (const char *schema_name, struct doca_telemetry_exporter_schema **doca_schema) |
| Initialize DOCA schema to prepare it for setting attributes and adding types. DOCA schema is used to initialize DOCA sources that will collect the data according to the same schema. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_buf_size (struct doca_telemetry_exporter_schema *doca_schema, uint64_t size) |
| Set buffer size Default value is 60000 bytes. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_buf_size (struct doca_telemetry_exporter_schema *doca_schema, uint64_t *size) |
| Get buffer size. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_buf_data_root (struct doca_telemetry_exporter_schema *doca_schema, const char *path) |
| Set buffer data root Default path is "/opt/mellanox/doca/services/telemetry/data/". More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_buf_data_root (struct doca_telemetry_exporter_schema *doca_schema, const char **path) |
| Get data root path. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_file_write_enabled (struct doca_telemetry_exporter_schema *doca_schema) |
| Enable file write file write is disabled by default. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_file_write_max_size (struct doca_telemetry_exporter_schema *doca_schema, size_t size) |
| Set file maximum size Default value is 1MB. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_file_write_max_size (struct doca_telemetry_exporter_schema *doca_schema, size_t *size) |
| Get file maximum size. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_file_write_max_age (struct doca_telemetry_exporter_schema *doca_schema, doca_telemetry_exporter_timestamp_t max_age) |
| Set file maximum age Default value is 1 hour. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_file_write_max_age (struct doca_telemetry_exporter_schema *doca_schema, doca_telemetry_exporter_timestamp_t *max_age) |
| Get file maximum age. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_ipc_enabled (struct doca_telemetry_exporter_schema *doca_schema) |
| Enable IPC IPC is disabled by default. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_ipc_sockets_dir (struct doca_telemetry_exporter_schema *doca_schema, const char *sockets_dir) |
| Set IPC socket directory. Default path is "/opt/mellanox/doca/services/telemetry/ipc_sockets". More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_ipc_sockets_dir (struct doca_telemetry_exporter_schema *doca_schema, const char **sockets_dir) |
| Get IPC socket directory. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_ipc_reconnect_time (struct doca_telemetry_exporter_schema *doca_schema, uint32_t max_time) |
| Set IPC reconnect time in milliseconds Time limit for reconnect attempts. If the limit is reached, the client is considered disconnected. Default value is 100 milliseconds. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_ipc_reconnect_time (struct doca_telemetry_exporter_schema *doca_schema, uint32_t *max_time) |
| Get IPC reconnect time in milliseconds. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_ipc_reconnect_tries (struct doca_telemetry_exporter_schema *doca_schema, uint8_t tries) |
| Set maximum IPC reconnect tries. Number of reconnect attempts during reconnection period. Default value is 3 tries. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_ipc_reconnect_tries (struct doca_telemetry_exporter_schema *doca_schema, uint8_t *tries) |
| Get maximum IPC reconnect tries. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_ipc_socket_timeout (struct doca_telemetry_exporter_schema *doca_schema, uint32_t timeout) |
| Set IPC socket timeout in milliseconds Timeout for IPC messaging socket. If timeout is reached during send_receive, the client is considered disconnected. Default value is 3000 milliseconds. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_get_ipc_socket_timeout (struct doca_telemetry_exporter_schema *doca_schema, uint32_t *timeout) |
| Get IPC socket timeout in milliseconds. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_schema_set_opaque_events_enabled (struct doca_telemetry_exporter_schema *doca_schema) |
| Enable opaque events Opaque events are disabled by default. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_type_create (struct doca_telemetry_exporter_type **type) |
| Create new telemetry type. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_type_add_field (struct doca_telemetry_exporter_type *type, struct doca_telemetry_exporter_field *field) |
| Add DOCA telemetry field to type. The users loses the ownership of the field after a successful invocation of the function. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_type_destroy (struct doca_telemetry_exporter_type *type) |
| Destroy doca telemetry type previously created by doca_telemetry_exporter_type_create() More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_field_create (struct doca_telemetry_exporter_field **field) |
| Create new telemetry field. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_field_destroy (struct doca_telemetry_exporter_field *field) |
| Destroy field previously created by doca_telemetry_exporter_field_create() More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_field_set_name (struct doca_telemetry_exporter_field *field_info, const char *name) |
| Set doca telemetry field name. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_field_set_description (struct doca_telemetry_exporter_field *field_info, const char *desc) |
| Set doca telemetry field description. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_field_set_type_name (struct doca_telemetry_exporter_field *field_info, const char *type) |
| Set doca telemetry field type. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_field_set_array_len (struct doca_telemetry_exporter_field *field_info, uint16_t len) |
| Set doca telemetry field length. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_add_type (struct doca_telemetry_exporter_schema *doca_schema, const char *new_type_name, struct doca_telemetry_exporter_type *type, doca_telemetry_exporter_type_index_t *type_index) |
| Add user-defined fields to create new type in DOCA schema. The users loses the ownership of the type after a successful invocation of the function. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_destroy (struct doca_telemetry_exporter_schema *doca_schema) |
| Destructor for DOCA schema. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_schema_start (struct doca_telemetry_exporter_schema *doca_schema) |
| Finalizes schema setup to start creating Doca Sources from the schema. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_create (struct doca_telemetry_exporter_schema *doca_schema, struct doca_telemetry_exporter_source **doca_source) |
| Creates a single DOCA source from schema. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_source_set_id (struct doca_telemetry_exporter_source *doca_source, const char *source_id) |
| Set source id. More... | |
| DOCA_EXPERIMENTAL void | doca_telemetry_exporter_source_set_tag (struct doca_telemetry_exporter_source *doca_source, const char *source_tag) |
| Set source tag. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_start (struct doca_telemetry_exporter_source *doca_source) |
| Applies source attribute and starts DOCA source. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_report (struct doca_telemetry_exporter_source *doca_source, doca_telemetry_exporter_type_index_t index, void *data, int count) |
| Report events data of the same type via DOCA source. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_opaque_report (struct doca_telemetry_exporter_source *doca_source, const doca_guid_t app_id, uint64_t user_defined1, uint64_t user_defined2, const void *data, uint32_t data_size) |
| Report opaque event data via DOCA source. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_get_opaque_report_max_data_size (struct doca_telemetry_exporter_source *doca_source, uint32_t *max_data_size) |
| Get max data size for opaque report. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_flush (struct doca_telemetry_exporter_source *doca_source) |
| Immediately flush the data of the DOCA source. This function is not thread-safe and should not be called from different threads without proper access control. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_source_destroy (struct doca_telemetry_exporter_source *doca_source) |
| Destructor for DOCA source. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_get_timestamp (doca_telemetry_exporter_timestamp_t *timestamp) |
| Get timestamp in the proper format. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_telemetry_exporter_check_ipc_status (struct doca_telemetry_exporter_source *doca_source, doca_telemetry_exporter_ipc_status_t *status) |
| Return status of IPC transport. More... | |
DOCA lib for exporting events to the telemetry service.
| #define DOCA_GUID_SIZE 16 |
DOCA GUID size.
Definition at line 128 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_BOOL "bool" |
DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_{} are data types that are used to create doca_telemetry_exporter_field;.
DOCA telemetry bool type
Definition at line 83 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_CHAR "char" |
DOCA telemetry char type.
Definition at line 85 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_DOUBLE "double" |
DOCA telemetry double type.
Definition at line 107 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_FLOAT "float" |
DOCA telemetry float type.
Definition at line 105 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT "int" |
DOCA telemetry in type.
Definition at line 89 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT16 "int16_t" |
DOCA telemetry int16 type.
Definition at line 111 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT32 "int32_t" |
DOCA telemetry int32 type.
Definition at line 113 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT64 "int64_t" |
DOCA telemetry int64 type.
Definition at line 115 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_INT8 "int8_t" |
DOCA telemetry int8 type.
Definition at line 109 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_LONG "long" |
DOCA telemetry long type.
Definition at line 91 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_LONGLONG "long long" |
DOCA telemetry longlong type.
Definition at line 93 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_SHORT "short" |
DOCA telemetry short type.
Definition at line 87 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_TIMESTAMP DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT64 |
DOCA telemetry timestamp type.
Definition at line 125 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UCHAR "unsigned char" |
DOCA telemetry uchar type.
Definition at line 95 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT "unsigned int" |
DOCA telemetry uint type.
Definition at line 99 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT16 "uint16_t" |
DOCA telemetry uint16 type.
Definition at line 119 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT32 "uint32_t" |
DOCA telemetry uint32 type.
Definition at line 121 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT64 "uint64_t" |
DOCA telemetry uint64 type.
Definition at line 123 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_UINT8 "uint8_t" |
DOCA telemetry uint8 type.
Definition at line 117 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_ULONG "unsigned long" |
DOCA telemetry ulong type.
Definition at line 101 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_ULONGLONG "unsigned long long" |
DOCA telemetry ulonglong type.
Definition at line 103 of file doca_telemetry_exporter.h.
| #define DOCA_TELEMETRY_EXPORTER_FIELD_TYPE_USHORT "unsigned short" |
DOCA telemetry ushort type.
Definition at line 97 of file doca_telemetry_exporter.h.
| typedef uint8_t doca_guid_t[DOCA_GUID_SIZE] |
DOCA GUID type.
Definition at line 132 of file doca_telemetry_exporter.h.
DOCA telemetry IPC status.
| typedef uint64_t doca_telemetry_exporter_timestamp_t |
DOCA schema type index type.
Definition at line 66 of file doca_telemetry_exporter.h.
| typedef uint8_t doca_telemetry_exporter_type_index_t |
DOCA schema field type index.
Definition at line 61 of file doca_telemetry_exporter.h.
DOCA telemetry IPC status.
| Enumerator | |
|---|---|
| DOCA_TELEMETRY_EXPORTER_IPC_STATUS_FAILED | |
| DOCA_TELEMETRY_EXPORTER_IPC_STATUS_CONNECTED | |
| DOCA_TELEMETRY_EXPORTER_IPC_STATUS_DISABLED | |
Definition at line 40 of file doca_telemetry_exporter.h.
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_check_ipc_status | ( | struct doca_telemetry_exporter_source * | doca_source, |
| doca_telemetry_exporter_ipc_status_t * | status | ||
| ) |
Return status of IPC transport.
| [in] | doca_source | Input doca source. |
| [out] | status | if return is DOCA_SUCCESS then status can be one of the following
|
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_field_create | ( | struct doca_telemetry_exporter_field ** | field | ) |
Create new telemetry field.
| [out] | field | Pointer to the newly allocated field. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_field_destroy | ( | struct doca_telemetry_exporter_field * | field | ) |
Destroy field previously created by doca_telemetry_exporter_field_create()
| [in] | field | Pointer to the field. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_field_set_array_len | ( | struct doca_telemetry_exporter_field * | field_info, |
| uint16_t | len | ||
| ) |
Set doca telemetry field length.
| [in] | field_info | Pointer to doca telemetry field. |
| [in] | len | Field length. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_field_set_description | ( | struct doca_telemetry_exporter_field * | field_info, |
| const char * | desc | ||
| ) |
Set doca telemetry field description.
| [in] | field_info | Pointer to doca telemetry field. |
| [in] | desc | Field description. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_field_set_name | ( | struct doca_telemetry_exporter_field * | field_info, |
| const char * | name | ||
| ) |
Set doca telemetry field name.
| [in] | field_info | Pointer to doca telemetry field. |
| [in] | name | Field name. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_field_set_type_name | ( | struct doca_telemetry_exporter_field * | field_info, |
| const char * | type | ||
| ) |
Set doca telemetry field type.
| [in] | field_info | Pointer to doca telemetry field. |
| [in] | type | Field type. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_get_timestamp | ( | doca_telemetry_exporter_timestamp_t * | timestamp | ) |
Get timestamp in the proper format.
| [out] | timestamp | Timestamp value |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_add_type | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| const char * | new_type_name, | ||
| struct doca_telemetry_exporter_type * | type, | ||
| doca_telemetry_exporter_type_index_t * | type_index | ||
| ) |
Add user-defined fields to create new type in DOCA schema. The users loses the ownership of the type after a successful invocation of the function.
| [in] | doca_schema | Schema to create type in. |
| [in] | new_type_name | Name for new type. |
| [in] | type | User-defined fields. |
| [out] | type_index | Type index for the created type is written to this variable. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_destroy | ( | struct doca_telemetry_exporter_schema * | doca_schema | ) |
Destructor for DOCA schema.
| [in] | doca_schema | Schema to destroy. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_buf_data_root | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| const char ** | path | ||
| ) |
Get data root path.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | path | Path to a folder where the data and schema will be stored. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_buf_size | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint64_t * | size | ||
| ) |
Get buffer size.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | size | The buffer size |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_file_write_max_age | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| doca_telemetry_exporter_timestamp_t * | max_age | ||
| ) |
Get file maximum age.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | max_age | Maximum file age. Once current file is older than this threshold a new file will be created. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_file_write_max_size | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| size_t * | size | ||
| ) |
Get file maximum size.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | size | Maximum size of binary data file. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_ipc_reconnect_time | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint32_t * | max_time | ||
| ) |
Get IPC reconnect time in milliseconds.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | max_time | Maximum reconnect time in milliseconds |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_ipc_reconnect_tries | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint8_t * | tries | ||
| ) |
Get maximum IPC reconnect tries.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | tries | Maximum reconnect tries |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_ipc_socket_timeout | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint32_t * | timeout | ||
| ) |
Get IPC socket timeout in milliseconds.
| [in] | doca_schema | Pointer to ipc timeout attribute. |
| [out] | timeout | Maximum socket timeout in milliseconds |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_get_ipc_sockets_dir | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| const char ** | sockets_dir | ||
| ) |
Get IPC socket directory.
| [in] | doca_schema | Pointer to DOCA schema. |
| [out] | sockets_dir | Path to a folder containing DOCA Telemetry Service (DTS) sockets. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_init | ( | const char * | schema_name, |
| struct doca_telemetry_exporter_schema ** | doca_schema | ||
| ) |
Initialize DOCA schema to prepare it for setting attributes and adding types. DOCA schema is used to initialize DOCA sources that will collect the data according to the same schema.
| [in] | schema_name | Name of the schema. |
| [out] | doca_schema | Pointer to DOCA schema, NULL on error. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_buf_data_root | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| const char * | path | ||
| ) |
Set buffer data root Default path is "/opt/mellanox/doca/services/telemetry/data/".
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | path | Path to a folder where the data and schema will be stored. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_buf_size | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint64_t | size | ||
| ) |
Set buffer size Default value is 60000 bytes.
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | size | Buffer size |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_file_write_enabled | ( | struct doca_telemetry_exporter_schema * | doca_schema | ) |
Enable file write file write is disabled by default.
| [in] | doca_schema | Pointer to DOCA schema. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_file_write_max_age | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| doca_telemetry_exporter_timestamp_t | max_age | ||
| ) |
Set file maximum age Default value is 1 hour.
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | max_age | Maximum file age. Once current file is older than this threshold a new file will be created. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_file_write_max_size | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| size_t | size | ||
| ) |
Set file maximum size Default value is 1MB.
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | size | Maximum size of binary data file. Once this size is reached, a new binary file will be created. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_ipc_enabled | ( | struct doca_telemetry_exporter_schema * | doca_schema | ) |
Enable IPC IPC is disabled by default.
| [in] | doca_schema | Pointer to DOCA schema. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_ipc_reconnect_time | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint32_t | max_time | ||
| ) |
Set IPC reconnect time in milliseconds Time limit for reconnect attempts. If the limit is reached, the client is considered disconnected. Default value is 100 milliseconds.
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | max_time | Maximum reconnect time in milliseconds |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_ipc_reconnect_tries | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint8_t | tries | ||
| ) |
Set maximum IPC reconnect tries. Number of reconnect attempts during reconnection period. Default value is 3 tries.
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | tries | Maximum reconnect tries |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_ipc_socket_timeout | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| uint32_t | timeout | ||
| ) |
Set IPC socket timeout in milliseconds Timeout for IPC messaging socket. If timeout is reached during send_receive, the client is considered disconnected. Default value is 3000 milliseconds.
| [in] | doca_schema | Pointer to ipc timeout attribute. |
| [in] | timeout | Maximum socket timeout in milliseconds |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_ipc_sockets_dir | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| const char * | sockets_dir | ||
| ) |
Set IPC socket directory. Default path is "/opt/mellanox/doca/services/telemetry/ipc_sockets".
| [in] | doca_schema | Pointer to DOCA schema. |
| [in] | sockets_dir | Path to a folder containing DOCA Telemetry Service (DTS) sockets. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_schema_set_opaque_events_enabled | ( | struct doca_telemetry_exporter_schema * | doca_schema | ) |
Enable opaque events Opaque events are disabled by default.
| [in] | doca_schema | Pointer to DOCA schema. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_schema_start | ( | struct doca_telemetry_exporter_schema * | doca_schema | ) |
Finalizes schema setup to start creating Doca Sources from the schema.
Do NOT add new types after this function was called.
| [in] | doca_schema | Input schema to start. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_create | ( | struct doca_telemetry_exporter_schema * | doca_schema, |
| struct doca_telemetry_exporter_source ** | doca_source | ||
| ) |
Creates a single DOCA source from schema.
To create a DOCA source, first call doca_telemetry_exporter_schema_start() to prepare the DOCA schema.
| [in] | doca_schema | Schema from which source will be created. |
| [out] | doca_source | pointer to DOCA source, or NULL on error. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_destroy | ( | struct doca_telemetry_exporter_source * | doca_source | ) |
Destructor for DOCA source.
| [in] | doca_source | Source to destroy. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_flush | ( | struct doca_telemetry_exporter_source * | doca_source | ) |
Immediately flush the data of the DOCA source. This function is not thread-safe and should not be called from different threads without proper access control.
| [in] | doca_source | DOCA source to flush. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_get_opaque_report_max_data_size | ( | struct doca_telemetry_exporter_source * | doca_source, |
| uint32_t * | max_data_size | ||
| ) |
Get max data size for opaque report.
| [in] | doca_source | Source to report. |
| [out] | max_data_size | Maximal data size |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_opaque_report | ( | struct doca_telemetry_exporter_source * | doca_source, |
| const doca_guid_t | app_id, | ||
| uint64_t | user_defined1, | ||
| uint64_t | user_defined2, | ||
| const void * | data, | ||
| uint32_t | data_size | ||
| ) |
Report opaque event data via DOCA source.
Data is flushed from internal buffer when the buffer is full. Flushing the data immediately can be done by invoking doca_telemetry_exporter_source_flush().
| [in] | doca_source | Source to report. |
| [in] | app_id | User defined application ID. |
| [in] | user_defined1 | User defined parameter 1. |
| [in] | user_defined2 | User defined parameter 2. |
| [in] | data | Data buffer. |
| [in] | data_size | Size of the data in the data buffer. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_report | ( | struct doca_telemetry_exporter_source * | doca_source, |
| doca_telemetry_exporter_type_index_t | index, | ||
| void * | data, | ||
| int | count | ||
| ) |
Report events data of the same type via DOCA source.
Data is flushed from internal buffer when the buffer is full. Flushing the data immediately can be done by invoking doca_telemetry_exporter_source_flush(). This function is not thread-safe and should not be called from different threads without proper access control.
| [in] | doca_source | Source to report. |
| [in] | index | Type index in the DOCA schema. |
| [in] | data | Data buffer. |
| [in] | count | Number of events written to the data buffer. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_source_set_id | ( | struct doca_telemetry_exporter_source * | doca_source, |
| const char * | source_id | ||
| ) |
Set source id.
| [in] | doca_source | Pointer to DOCA source. |
| [in] | source_id | Hostname or guid. |
| DOCA_EXPERIMENTAL void doca_telemetry_exporter_source_set_tag | ( | struct doca_telemetry_exporter_source * | doca_source, |
| const char * | source_tag | ||
| ) |
Set source tag.
| [in] | doca_source | Pointer to DOCA source. |
| [in] | source_tag | User defined data-file name prefix. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_source_start | ( | struct doca_telemetry_exporter_source * | doca_source | ) |
Applies source attribute and starts DOCA source.
Call this function to start reporting.
| [in] | doca_source | DOCA source to start. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_type_add_field | ( | struct doca_telemetry_exporter_type * | type, |
| struct doca_telemetry_exporter_field * | field | ||
| ) |
Add DOCA telemetry field to type. The users loses the ownership of the field after a successful invocation of the function.
| [out] | type | Pointer to doca telemetry type. |
| [out] | field | DOCA Telemetry field to add. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_type_create | ( | struct doca_telemetry_exporter_type ** | type | ) |
Create new telemetry type.
| [out] | type | Pointer to the newly allocated type. |
| DOCA_EXPERIMENTAL doca_error_t doca_telemetry_exporter_type_destroy | ( | struct doca_telemetry_exporter_type * | type | ) |
Destroy doca telemetry type previously created by doca_telemetry_exporter_type_create()
| [in] | type | Pointer to type. |