DPDK
19.02.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_metrics
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
52
struct
rte_metric_name
{
54
char
name
[
RTE_METRICS_MAX_NAME_LEN
];
55
};
56
57
66
struct
rte_metric_value
{
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
144
int
rte_metrics_get_names
(
145
struct
rte_metric_name
*names,
146
uint16_t capacity);
147
170
int
rte_metrics_get_values
(
171
int
port_id,
172
struct
rte_metric_value
*values,
173
uint16_t capacity);
174
189
int
rte_metrics_update_value
(
190
int
port_id,
191
uint16_t key,
192
const
uint64_t value);
193
212
int
rte_metrics_update_values
(
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
Generated by
1.8.1.2