NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_pcc_dev_algo_access.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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 
21 #ifndef DOCA_PCC_DEV_ALGO_ACCESS_H_
22 #define DOCA_PCC_DEV_ALGO_ACCESS_H_
23 
24 #include <doca_pcc_dev.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
35 #define DOCA_PCC_DEV_TARGET_APP_RP (0)
36 
42 #define DOCA_PCC_DEV_TARGET_APP_NP (1)
43 
49 #define DOCA_PCC_DEV_ALGO_SLOT(target_app, ppcc_algo_slot) ((target_app << 16) | (ppcc_algo_slot & 0xffff))
50 
55  uint32_t algo_id;
56  uint32_t algo_major_version;
57  uint32_t algo_minor_version;
58  uint32_t algo_desc_size;
59  uint64_t algo_desc_addr;
60 };
61 
86  const struct doca_pcc_dev_algo_meta_data *user_def,
87  uint32_t param_num,
88  uint32_t counter_num);
89 
111  uint32_t param_id,
112  uint32_t default_value,
113  uint32_t max_value,
114  uint32_t min_value,
115  uint32_t permissions,
116  uint32_t param_desc_size,
117  uint64_t param_desc_addr);
118 
137  uint32_t counter_id,
138  uint32_t max_value,
139  uint32_t permissions,
140  uint32_t counter_desc_size,
141  uint64_t counter_desc_addr);
142 
163  uint32_t algo_slot,
164  uint32_t algo_idx,
165  uint32_t algo_en);
166 
176 uint32_t doca_pcc_dev_get_counters_num(uint32_t port_num, uint32_t algo_slot);
177 
190 uint32_t *doca_pcc_dev_get_counters(uint32_t port_num, uint32_t algo_slot);
191 
201 uint32_t doca_pcc_dev_get_algo_params_num(uint32_t port_num, uint32_t algo_slot);
202 
215 uint32_t *doca_pcc_dev_get_algo_params(uint32_t port_num, uint32_t algo_slot);
216 
226 uint32_t doca_pcc_dev_get_algo_index(uint32_t port_num, uint32_t algo_slot);
227 
228 #ifdef __cplusplus
229 }
230 #endif
231 
234 #endif /* DOCA_PCC_DEV_ALGO_ACCESS_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
DOCA_STABLE doca_pcc_dev_error_t doca_pcc_dev_algo_init_counter(uint32_t algo_idx, uint32_t counter_id, uint32_t max_value, uint32_t permissions, uint32_t counter_desc_size, uint64_t counter_desc_addr)
Initialize a single counter for an algo.
DOCA_STABLE uint32_t * doca_pcc_dev_get_algo_params(uint32_t port_num, uint32_t algo_slot)
Get pointer to param array of a specific algo and specific port.
DOCA_STABLE uint32_t doca_pcc_dev_get_algo_params_num(uint32_t port_num, uint32_t algo_slot)
Get number of params supported per algo on the port.
DOCA_STABLE doca_pcc_dev_error_t doca_pcc_dev_algo_init_param(uint32_t algo_idx, uint32_t param_id, uint32_t default_value, uint32_t max_value, uint32_t min_value, uint32_t permissions, uint32_t param_desc_size, uint64_t param_desc_addr)
Initialize a single parameter for an algo.
DOCA_STABLE doca_pcc_dev_error_t doca_pcc_dev_algo_init_metadata(uint32_t algo_idx, const struct doca_pcc_dev_algo_meta_data *user_def, uint32_t param_num, uint32_t counter_num)
Initialize the algo database.
DOCA_STABLE uint32_t * doca_pcc_dev_get_counters(uint32_t port_num, uint32_t algo_slot)
Get pointer to counter array of a specific algo and specific port.
DOCA_STABLE doca_pcc_dev_error_t doca_pcc_dev_init_algo_slot(uint32_t portid, uint32_t algo_slot, uint32_t algo_idx, uint32_t algo_en)
Initialize the algo per port database.
DOCA_STABLE uint32_t doca_pcc_dev_get_algo_index(uint32_t port_num, uint32_t algo_slot)
Get identifier of a specific algo and specific port.
DOCA_STABLE uint32_t doca_pcc_dev_get_counters_num(uint32_t port_num, uint32_t algo_slot)
Get number of counters supported per algo on the port.
doca_pcc_dev_error_t
API functions return status.
This struct provides meta data for a pcc user algo.