DPDK  23.03.0
rte_metrics.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4 
23 #ifndef _RTE_METRICS_H_
24 #define _RTE_METRICS_H_
25 
26 #include <stdint.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 extern int metrics_initialized;
33 
35 #define RTE_METRICS_MAX_NAME_LEN 64
36 #define RTE_METRICS_MAX_METRICS 256
37 
46 #define RTE_METRICS_GLOBAL -1
47 
57 };
58 
59 
70  uint16_t key;
72  uint64_t value;
73 };
74 
88 int rte_metrics_init(int socket_id);
89 
101 int rte_metrics_deinit(void);
102 
122 int rte_metrics_reg_name(const char *name);
123 
143 int rte_metrics_reg_names(const char * const *names, uint16_t cnt_names);
144 
165  struct rte_metric_name *names,
166  uint16_t capacity);
167 
191  int port_id,
192  struct rte_metric_value *values,
193  uint16_t capacity);
194 
210  int port_id,
211  uint16_t key,
212  const uint64_t value);
213 
233  int port_id,
234  uint16_t key,
235  const uint64_t *values,
236  uint32_t count);
237 
238 #ifdef __cplusplus
239 }
240 #endif
241 
242 #endif
char name[RTE_METRICS_MAX_NAME_LEN]
Definition: rte_metrics.h:56
int rte_metrics_update_values(int port_id, uint16_t key, const uint64_t *values, uint32_t count)
int rte_metrics_update_value(int port_id, uint16_t key, const uint64_t value)
#define RTE_METRICS_MAX_NAME_LEN
Definition: rte_metrics.h:35
int rte_metrics_get_values(int port_id, struct rte_metric_value *values, uint16_t capacity)
uint64_t value
Definition: rte_metrics.h:72
int rte_metrics_get_names(struct rte_metric_name *names, uint16_t capacity)
int rte_metrics_reg_name(const char *name)
int rte_metrics_reg_names(const char *const *names, uint16_t cnt_names)
int rte_metrics_init(int socket_id)
int rte_metrics_deinit(void)