DPDK 21.11.9
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
30extern "C" {
31#endif
32
33extern 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
83void rte_metrics_init(int socket_id);
84
97
117int rte_metrics_reg_name(const char *name);
118
138int rte_metrics_reg_names(const char * const *names, uint16_t cnt_names);
139
160 struct rte_metric_name *names,
161 uint16_t capacity);
162
186 int port_id,
187 struct rte_metric_value *values,
188 uint16_t capacity);
189
205 int port_id,
206 uint16_t key,
207 const uint64_t value);
208
228 int port_id,
229 uint16_t key,
230 const uint64_t *values,
231 uint32_t count);
232
233#ifdef __cplusplus
234}
235#endif
236
237#endif
int rte_metrics_update_value(int port_id, uint16_t key, const uint64_t value)
int rte_metrics_deinit(void)
int rte_metrics_reg_name(const char *name)
int rte_metrics_get_names(struct rte_metric_name *names, uint16_t capacity)
int rte_metrics_reg_names(const char *const *names, uint16_t cnt_names)
int rte_metrics_get_values(int port_id, struct rte_metric_value *values, uint16_t capacity)
#define RTE_METRICS_MAX_NAME_LEN
Definition: rte_metrics.h:36
void rte_metrics_init(int socket_id)
int rte_metrics_update_values(int port_id, uint16_t key, const uint64_t *values, uint32_t count)
char name[RTE_METRICS_MAX_NAME_LEN]
Definition: rte_metrics.h:57
uint64_t value
Definition: rte_metrics.h:73