DPDK  24.07.0
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 
27 #include <stdint.h>
28 #include <rte_port.h>
29 
30 struct rte_mbuf;
31 
34  uint64_t n_pkts_in;
35  uint64_t n_pkts_lookup_miss;
36 };
37 
51 typedef void* (*rte_table_op_create)(void *params, int socket_id,
52  uint32_t entry_size);
53 
62 typedef int (*rte_table_op_free)(void *table);
63 
91 typedef int (*rte_table_op_entry_add)(
92  void *table,
93  void *key,
94  void *entry,
95  int *key_found,
96  void **entry_ptr);
97 
121  void *table,
122  void *key,
123  int *key_found,
124  void *entry);
125 
156  void *table,
157  void **keys,
158  void **entries,
159  uint32_t n_keys,
160  int *key_found,
161  void **entries_ptr);
162 
191  void *table,
192  void **keys,
193  uint32_t n_keys,
194  int *key_found,
195  void **entries);
196 
230 typedef int (*rte_table_op_lookup)(
231  void *table,
232  struct rte_mbuf **pkts,
233  uint64_t pkts_mask,
234  uint64_t *lookup_hit_mask,
235  void **entries);
236 
250 typedef int (*rte_table_op_stats_read)(
251  void *table,
252  struct rte_table_stats *stats,
253  int clear);
254 
265 };
266 
267 #ifdef __cplusplus
268 }
269 #endif
270 
271 #endif
rte_table_op_entry_add f_add
Definition: rte_table.h:259
int(* rte_table_op_stats_read)(void *table, struct rte_table_stats *stats, int clear)
Definition: rte_table.h:250
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:155
rte_table_op_free f_free
Definition: rte_table.h:258
rte_table_op_create f_create
Definition: rte_table.h:257
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:230
int(* rte_table_op_entry_delete)(void *table, void *key, int *key_found, void *entry)
Definition: rte_table.h:120
int(* rte_table_op_entry_delete_bulk)(void *table, void **keys, uint32_t n_keys, int *key_found, void **entries)
Definition: rte_table.h:190
rte_table_op_entry_delete_bulk f_delete_bulk
Definition: rte_table.h:262
rte_table_op_lookup f_lookup
Definition: rte_table.h:263
void *(* rte_table_op_create)(void *params, int socket_id, uint32_t entry_size)
Definition: rte_table.h:51
rte_table_op_entry_delete f_delete
Definition: rte_table.h:260
int(* rte_table_op_free)(void *table)
Definition: rte_table.h:62
rte_table_op_entry_add_bulk f_add_bulk
Definition: rte_table.h:261
rte_table_op_stats_read f_stats
Definition: rte_table.h:264
int(* rte_table_op_entry_add)(void *table, void *key, void *entry, int *key_found, void **entry_ptr)
Definition: rte_table.h:91