DPDK  21.08.0
rte_swx_table.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2020 Intel Corporation
3  */
4 #ifndef __INCLUDE_RTE_SWX_TABLE_H__
5 #define __INCLUDE_RTE_SWX_TABLE_H__
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
18 #include <stdint.h>
19 #include <sys/queue.h>
20 
25 
28 
31 };
32 
37 
39  uint32_t key_size;
40 
42  uint32_t key_offset;
43 
52  uint8_t *key_mask0;
53 
58  uint32_t action_data_size;
59 
63  uint32_t n_keys_max;
64 };
65 
71  TAILQ_ENTRY(rte_swx_table_entry) node;
72 
76  uint8_t *key;
77 
83  uint8_t *key_mask;
84 
90  uint64_t key_signature;
91 
99  uint32_t key_priority;
100 
102  uint64_t action_id;
103 
110  uint8_t *action_data;
111 };
112 
114 TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);
115 
128 typedef uint64_t
130  struct rte_swx_table_entry_list *entries,
131  const char *args);
132 
143 typedef uint64_t
145 
160 typedef void *
161 (*rte_swx_table_create_t)(struct rte_swx_table_params *params,
162  struct rte_swx_table_entry_list *entries,
163  const char *args,
164  int numa_node);
165 
178 typedef int
179 (*rte_swx_table_add_t)(void *table,
180  struct rte_swx_table_entry *entry);
181 
195 typedef int
196 (*rte_swx_table_delete_t)(void *table,
197  struct rte_swx_table_entry *entry);
198 
248 typedef int
249 (*rte_swx_table_lookup_t)(void *table,
250  void *mailbox,
251  uint8_t **key,
252  uint64_t *action_id,
253  uint8_t **action_data,
254  int *hit);
255 
262 typedef void
263 (*rte_swx_table_free_t)(void *table);
264 
269 
272 
275 
281 
287 
290 
293 };
294 
295 #ifdef __cplusplus
296 }
297 #endif
298 
299 #endif
rte_swx_table_mailbox_size_get_t mailbox_size_get
rte_swx_table_create_t create
uint8_t * key_mask
Definition: rte_swx_table.h:83
uint32_t key_priority
Definition: rte_swx_table.h:99
Definition: rte_swx_table.h:67
rte_swx_table_add_t add
enum rte_swx_table_match_type match_type
Definition: rte_swx_table.h:36
rte_swx_table_lookup_t lkp
int(* rte_swx_table_delete_t)(void *table, struct rte_swx_table_entry *entry)
rte_swx_table_match_type
Definition: rte_swx_table.h:22
TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry)
uint64_t key_signature
Definition: rte_swx_table.h:90
void(* rte_swx_table_free_t)(void *table)
void *(* rte_swx_table_create_t)(struct rte_swx_table_params *params, struct rte_swx_table_entry_list *entries, const char *args, int numa_node)
rte_swx_table_footprint_get_t footprint_get
uint64_t action_id
uint64_t(* rte_swx_table_footprint_get_t)(struct rte_swx_table_params *params, struct rte_swx_table_entry_list *entries, const char *args)
uint8_t * key
Definition: rte_swx_table.h:76
uint64_t(* rte_swx_table_mailbox_size_get_t)(void)
int(* rte_swx_table_add_t)(void *table, struct rte_swx_table_entry *entry)
uint8_t * action_data
rte_swx_table_free_t free
int(* rte_swx_table_lookup_t)(void *table, void *mailbox, uint8_t **key, uint64_t *action_id, uint8_t **action_data, int *hit)
rte_swx_table_delete_t del