DPDK  20.05.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 #include <rte_compat.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 extern int metrics_initialized;
34 
36 #define RTE_METRICS_MAX_NAME_LEN 64
37 #define RTE_METRICS_MAX_METRICS 256
38 
47 #define RTE_METRICS_GLOBAL -1
48 
58 };
59 
60 
71  uint16_t key;
73  uint64_t value;
74 };
75 
83 void rte_metrics_init(int socket_id);
84 
99 __rte_experimental
100 int rte_metrics_deinit(void);
101 
121 int rte_metrics_reg_name(const char *name);
122 
142 int rte_metrics_reg_names(const char * const *names, uint16_t cnt_names);
143 
164  struct rte_metric_name *names,
165  uint16_t capacity);
166 
190  int port_id,
191  struct rte_metric_value *values,
192  uint16_t capacity);
193 
209  int port_id,
210  uint16_t key,
211  const uint64_t value);
212 
232  int port_id,
233  uint16_t key,
234  const uint64_t *values,
235  uint32_t count);
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif
char name[RTE_METRICS_MAX_NAME_LEN]
Definition: rte_metrics.h:57
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)
void rte_metrics_init(int socket_id)
#define RTE_METRICS_MAX_NAME_LEN
Definition: rte_metrics.h:36
int rte_metrics_get_values(int port_id, struct rte_metric_value *values, uint16_t capacity)
uint64_t value
Definition: rte_metrics.h:73
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)
__rte_experimental int rte_metrics_deinit(void)