NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_telemetry_pcc.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 
23 #ifndef DOCA_TELEMETRY_PCC_H_
24 #define DOCA_TELEMETRY_PCC_H_
25 
26 #include <doca_error.h>
27 #include <doca_types.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /**********************************************************************************************************************
34  * DOCA core opaque types
35  *********************************************************************************************************************/
36 struct doca_dev;
37 struct doca_devinfo;
38 
39 /*********************************************************************************************************************
40  * DOCA Telemetry PCC Context
41  *********************************************************************************************************************/
42 
46 struct doca_telemetry_pcc;
47 
64 doca_error_t doca_telemetry_pcc_cap_is_supported(const struct doca_devinfo *devinfo);
65 
82 doca_error_t doca_telemetry_pcc_create(struct doca_dev *dev, struct doca_telemetry_pcc **pcc);
83 
97 doca_error_t doca_telemetry_pcc_destroy(struct doca_telemetry_pcc *pcc);
98 
112 doca_error_t doca_telemetry_pcc_start(struct doca_telemetry_pcc *pcc);
113 
127 doca_error_t doca_telemetry_pcc_stop(struct doca_telemetry_pcc *pcc);
128 
146 doca_error_t doca_telemetry_pcc_cap_get_max_algo_slots(const struct doca_devinfo *devinfo, uint32_t *max_algo_slots);
147 
165 doca_error_t doca_telemetry_pcc_get_algo_id(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *algo_id);
166 
185  uint8_t algo_slot,
186  uint32_t *major_ver);
187 
206  uint8_t algo_slot,
207  uint32_t *minor_ver);
208 
230  uint8_t algo_slot,
231  uint8_t *algo_enabled,
232  uint8_t *counters_enabled);
233 
251  uint32_t *max_algo_info_len);
252 
271 doca_error_t doca_telemetry_pcc_get_algo_info(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, char *algo_info);
272 
291 doca_error_t doca_telemetry_pcc_get_num_counters(struct doca_telemetry_pcc *pcc,
292  uint8_t algo_slot,
293  uint32_t *num_counters);
294 
312  uint32_t *max_counter_info_len);
313 
334 doca_error_t doca_telemetry_pcc_get_counter_info(struct doca_telemetry_pcc *pcc,
335  uint8_t algo_slot,
336  uint8_t counter_id,
337  char *counter_info);
338 
356  uint32_t *max_num_counters);
357 
379 doca_error_t doca_telemetry_pcc_get_counters(struct doca_telemetry_pcc *pcc,
380  uint8_t algo_slot,
381  uint32_t *counters_populated,
382  uint32_t *counters);
383 
407  uint8_t algo_slot,
408  uint32_t *counters_populated,
409  uint32_t *counters);
410 
411 #ifdef __cplusplus
412 } /* extern "C" */
413 #endif
414 
415 #endif /* DOCA_TELEMETRY_PCC_H_ */
416 
#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.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_stop(struct doca_telemetry_pcc *pcc)
Stop pcc counter extraction context.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_cap_get_max_algo_info_len(const struct doca_devinfo *devinfo, uint32_t *max_algo_info_len)
Get the maximum number of characters that be returned by an algo_info request.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_create(struct doca_dev *dev, struct doca_telemetry_pcc **pcc)
Create a DOCA Telemetry PCC instance.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_cap_get_max_algo_slots(const struct doca_devinfo *devinfo, uint32_t *max_algo_slots)
Get the maximum number of algo slots that may be populated.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_algo_minor_version(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *minor_ver)
Get the minor version number of algo on a specific slot.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_algo_info(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, char *algo_info)
Get information on a given algorithm.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_cap_is_supported(const struct doca_devinfo *devinfo)
Check if given device is capable of executing telemetry PCC operations.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_algo_enable_status(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint8_t *algo_enabled, uint8_t *counters_enabled)
Get the enable status for a given algo slot.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_destroy(struct doca_telemetry_pcc *pcc)
Destroy doca_telemetry_pcc previously created by doca_telemetry_pcc_create().
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_algo_id(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *algo_id)
Get the id of algo on a specific slot.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_and_clear_counters(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *counters_populated, uint32_t *counters)
Get and clear (reset to 0) counters for PCC algo slot.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_cap_get_max_counter_info_len(const struct doca_devinfo *devinfo, uint32_t *max_counter_info_len)
Get the maximum number of characters that be returned by a counter_info request.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_algo_major_version(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *major_ver)
Get the major version number of algo on a specific slot.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_counter_info(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint8_t counter_id, char *counter_info)
Get information on a given counter.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_cap_get_max_num_counters(const struct doca_devinfo *devinfo, uint32_t *max_num_counters)
Get the maximum number of counters that may be returned.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_counters(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *counters_populated, uint32_t *counters)
Get counters for PCC algo slot.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_start(struct doca_telemetry_pcc *pcc)
Start context for pcc counter extraction.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_pcc_get_num_counters(struct doca_telemetry_pcc *pcc, uint8_t algo_slot, uint32_t *num_counters)
Get the number of counters available in a given algo slot.