DPDK  22.07.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 
20 #include <rte_os.h>
21 
26 
29 
32 };
33 
38 
40  uint32_t key_size;
41 
43  uint32_t key_offset;
44 
53  uint8_t *key_mask0;
54 
59  uint32_t action_data_size;
60 
64  uint32_t n_keys_max;
65 };
66 
72  RTE_TAILQ_ENTRY(rte_swx_table_entry) node;
73 
77  uint8_t *key;
78 
84  uint8_t *key_mask;
85 
91  uint64_t key_signature;
92 
100  uint32_t key_priority;
101 
103  uint64_t action_id;
104 
111  uint8_t *action_data;
112 };
113 
115 RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);
116 
129 typedef uint64_t
131  struct rte_swx_table_entry_list *entries,
132  const char *args);
133 
144 typedef uint64_t
146 
161 typedef void *
162 (*rte_swx_table_create_t)(struct rte_swx_table_params *params,
163  struct rte_swx_table_entry_list *entries,
164  const char *args,
165  int numa_node);
166 
179 typedef int
180 (*rte_swx_table_add_t)(void *table,
181  struct rte_swx_table_entry *entry);
182 
196 typedef int
197 (*rte_swx_table_delete_t)(void *table,
198  struct rte_swx_table_entry *entry);
199 
249 typedef int
250 (*rte_swx_table_lookup_t)(void *table,
251  void *mailbox,
252  uint8_t **key,
253  uint64_t *action_id,
254  uint8_t **action_data,
255  int *hit);
256 
263 typedef void
264 (*rte_swx_table_free_t)(void *table);
265 
270 
273 
276 
282 
288 
291 
294 };
295 
296 #ifdef __cplusplus
297 }
298 #endif
299 
300 #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:84
uint32_t key_priority
Definition: rte_swx_table.h:68
rte_swx_table_add_t add
enum rte_swx_table_match_type match_type
Definition: rte_swx_table.h:37
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:23
uint64_t key_signature
Definition: rte_swx_table.h:91
RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry)
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:77
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