DPDK  19.08.2
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 
34 #define RTE_METRICS_MAX_NAME_LEN 64
35 
44 #define RTE_METRICS_GLOBAL -1
45 
46 
56 };
57 
58 
69  uint16_t key;
71  uint64_t value;
72 };
73 
74 
82 void rte_metrics_init(int socket_id);
83 
98 __rte_experimental
99 int rte_metrics_deinit(void);
100 
120 int rte_metrics_reg_name(const char *name);
121 
141 int rte_metrics_reg_names(const char * const *names, uint16_t cnt_names);
142 
163  struct rte_metric_name *names,
164  uint16_t capacity);
165 
189  int port_id,
190  struct rte_metric_value *values,
191  uint16_t capacity);
192 
208  int port_id,
209  uint16_t key,
210  const uint64_t value);
211 
231  int port_id,
232  uint16_t key,
233  const uint64_t *values,
234  uint32_t count);
235 
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #endif
char name[RTE_METRICS_MAX_NAME_LEN]
Definition: rte_metrics.h:55
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:34
int rte_metrics_get_values(int port_id, struct rte_metric_value *values, uint16_t capacity)
uint64_t value
Definition: rte_metrics.h:71
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)