DPDK  24.11.0-rc3
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 
23 #include <stdint.h>
24 #include <rte_port.h>
25 
26 struct rte_mbuf;
27 
30  uint64_t n_pkts_in;
31  uint64_t n_pkts_lookup_miss;
32 };
33 
47 typedef void* (*rte_table_op_create)(void *params, int socket_id,
48  uint32_t entry_size);
49 
58 typedef int (*rte_table_op_free)(void *table);
59 
87 typedef int (*rte_table_op_entry_add)(
88  void *table,
89  void *key,
90  void *entry,
91  int *key_found,
92  void **entry_ptr);
93 
117  void *table,
118  void *key,
119  int *key_found,
120  void *entry);
121 
152  void *table,
153  void **keys,
154  void **entries,
155  uint32_t n_keys,
156  int *key_found,
157  void **entries_ptr);
158 
187  void *table,
188  void **keys,
189  uint32_t n_keys,
190  int *key_found,
191  void **entries);
192 
226 typedef int (*rte_table_op_lookup)(
227  void *table,
228  struct rte_mbuf **pkts,
229  uint64_t pkts_mask,
230  uint64_t *lookup_hit_mask,
231  void **entries);
232 
246 typedef int (*rte_table_op_stats_read)(
247  void *table,
248  struct rte_table_stats *stats,
249  int clear);
250 
261 };
262 
263 #endif
rte_table_op_entry_add f_add
Definition: rte_table.h:255
int(* rte_table_op_stats_read)(void *table, struct rte_table_stats *stats, int clear)
Definition: rte_table.h:246
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:151
rte_table_op_free f_free
Definition: rte_table.h:254
rte_table_op_create f_create
Definition: rte_table.h:253
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:226
int(* rte_table_op_entry_delete)(void *table, void *key, int *key_found, void *entry)
Definition: rte_table.h:116
int(* rte_table_op_entry_delete_bulk)(void *table, void **keys, uint32_t n_keys, int *key_found, void **entries)
Definition: rte_table.h:186
rte_table_op_entry_delete_bulk f_delete_bulk
Definition: rte_table.h:258
rte_table_op_lookup f_lookup
Definition: rte_table.h:259
void *(* rte_table_op_create)(void *params, int socket_id, uint32_t entry_size)
Definition: rte_table.h:47
rte_table_op_entry_delete f_delete
Definition: rte_table.h:256
int(* rte_table_op_free)(void *table)
Definition: rte_table.h:58
rte_table_op_entry_add_bulk f_add_bulk
Definition: rte_table.h:257
rte_table_op_stats_read f_stats
Definition: rte_table.h:260
int(* rte_table_op_entry_add)(void *table, void *key, void *entry, int *key_found, void **entry_ptr)
Definition: rte_table.h:87