DPDK  19.11.14
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 
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 
122  void *table,
123  void *key,
124  int *key_found,
125  void *entry);
126 
157  void *table,
158  void **keys,
159  void **entries,
160  uint32_t n_keys,
161  int *key_found,
162  void **entries_ptr);
163 
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 
266 };
267 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #endif
rte_table_op_entry_add f_add
Definition: rte_table.h:260
int(* rte_table_op_stats_read)(void *table, struct rte_table_stats *stats, int clear)
Definition: rte_table.h:251
int(* rte_table_op_entry_add_bulk)(void *table, void **keys, void **entries, uint32_t n_keys, int *key_found, void **entries_ptr)
Definition: rte_table.h:156
rte_table_op_free f_free
Definition: rte_table.h:259
rte_table_op_create f_create
Definition: rte_table.h:258
int(* rte_table_op_lookup)(void *table, struct rte_mbuf **pkts, uint64_t pkts_mask, uint64_t *lookup_hit_mask, void **entries)
Definition: rte_table.h:231
int(* rte_table_op_entry_delete)(void *table, void *key, int *key_found, void *entry)
Definition: rte_table.h:121
int(* rte_table_op_entry_delete_bulk)(void *table, void **keys, uint32_t n_keys, int *key_found, void **entries)
Definition: rte_table.h:191
rte_table_op_entry_delete_bulk f_delete_bulk
Definition: rte_table.h:263
rte_table_op_lookup f_lookup
Definition: rte_table.h:264
void *(* rte_table_op_create)(void *params, int socket_id, uint32_t entry_size)
Definition: rte_table.h:52
rte_table_op_entry_delete f_delete
Definition: rte_table.h:261
int(* rte_table_op_free)(void *table)
Definition: rte_table.h:63
rte_table_op_entry_add_bulk f_add_bulk
Definition: rte_table.h:262
rte_table_op_stats_read f_stats
Definition: rte_table.h:265
int(* rte_table_op_entry_add)(void *table, void *key, void *entry, int *key_found, void **entry_ptr)
Definition: rte_table.h:92