DPDK
18.05.1
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_table
rte_table.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2010-2014 Intel Corporation
3
*/
4
5
#ifndef __INCLUDE_RTE_TABLE_H__
6
#define __INCLUDE_RTE_TABLE_H__
7
8
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
11
28
#include <stdint.h>
29
#include <
rte_port.h
>
30
31
struct
rte_mbuf
;
32
34
struct
rte_table_stats
{
35
uint64_t n_pkts_in;
36
uint64_t n_pkts_lookup_miss;
37
};
38
52
typedef
void
* (*rte_table_op_create)(
void
*params,
int
socket_id,
53
uint32_t entry_size);
54
63
typedef
int (*
rte_table_op_free
)(
void
*table);
64
92
typedef
int (*
rte_table_op_entry_add
)(
93
void
*table,
94
void
*key,
95
void
*entry,
96
int
*key_found,
97
void
**entry_ptr);
98
121
typedef
int (*
rte_table_op_entry_delete
)(
122
void
*table,
123
void
*key,
124
int
*key_found,
125
void
*entry);
126
156
typedef
int (*
rte_table_op_entry_add_bulk
)(
157
void
*table,
158
void
**keys,
159
void
**entries,
160
uint32_t n_keys,
161
int
*key_found,
162
void
**entries_ptr);
163
191
typedef
int (*
rte_table_op_entry_delete_bulk
)(
192
void
*table,
193
void
**keys,
194
uint32_t n_keys,
195
int
*key_found,
196
void
**entries);
197
231
typedef
int (*
rte_table_op_lookup
)(
232
void
*table,
233
struct
rte_mbuf
**pkts,
234
uint64_t pkts_mask,
235
uint64_t *lookup_hit_mask,
236
void
**entries);
237
251
typedef
int (*
rte_table_op_stats_read
)(
252
void
*table,
253
struct
rte_table_stats
*stats,
254
int
clear);
255
257
struct
rte_table_ops
{
258
rte_table_op_create
f_create
;
259
rte_table_op_free
f_free
;
260
rte_table_op_entry_add
f_add
;
261
rte_table_op_entry_delete
f_delete
;
262
rte_table_op_entry_add_bulk
f_add_bulk
;
263
rte_table_op_entry_delete_bulk
f_delete_bulk
;
264
rte_table_op_lookup
f_lookup
;
265
rte_table_op_stats_read
f_stats
;
266
};
267
268
#ifdef __cplusplus
269
}
270
#endif
271
272
#endif
Generated by
1.8.1.2