DPDK  18.11.11
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 
33 #define RTE_METRICS_MAX_NAME_LEN 64
34 
43 #define RTE_METRICS_GLOBAL -1
44 
45 
55 };
56 
57 
68  uint16_t key;
70  uint64_t value;
71 };
72 
73 
81 void rte_metrics_init(int socket_id);
82 
102 int rte_metrics_reg_name(const char *name);
103 
123 int rte_metrics_reg_names(const char * const *names, uint16_t cnt_names);
124 
145  struct rte_metric_name *names,
146  uint16_t capacity);
147 
171  int port_id,
172  struct rte_metric_value *values,
173  uint16_t capacity);
174 
190  int port_id,
191  uint16_t key,
192  const uint64_t value);
193 
213  int port_id,
214  uint16_t key,
215  const uint64_t *values,
216  uint32_t count);
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #endif
char name[RTE_METRICS_MAX_NAME_LEN]
Definition: rte_metrics.h:54
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:33
int rte_metrics_get_values(int port_id, struct rte_metric_value *values, uint16_t capacity)
uint64_t value
Definition: rte_metrics.h:70
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)