DPDK  21.11.6
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 
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_params::match_type
enum rte_swx_table_match_type match_type
Definition: rte_swx_table.h:37
rte_swx_table_params::n_keys_max
uint32_t n_keys_max
Definition: rte_swx_table.h:64
RTE_SWX_TABLE_MATCH_EXACT
@ RTE_SWX_TABLE_MATCH_EXACT
Definition: rte_swx_table.h:31
rte_swx_table_entry::key_priority
uint32_t key_priority
Definition: rte_swx_table.h:100
rte_swx_table_params::key_offset
uint32_t key_offset
Definition: rte_swx_table.h:43
RTE_TAILQ_HEAD
RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry)
rte_swx_table_entry::key_mask
uint8_t * key_mask
Definition: rte_swx_table.h:84
rte_swx_table_ops::free
rte_swx_table_free_t free
Definition: rte_swx_table.h:293
rte_swx_table_ops::add
rte_swx_table_add_t add
Definition: rte_swx_table.h:281
rte_swx_table_lookup_t
int(* rte_swx_table_lookup_t)(void *table, void *mailbox, uint8_t **key, uint64_t *action_id, uint8_t **action_data, int *hit)
Definition: rte_swx_table.h:250
rte_swx_table_footprint_get_t
uint64_t(* rte_swx_table_footprint_get_t)(struct rte_swx_table_params *params, struct rte_swx_table_entry_list *entries, const char *args)
Definition: rte_swx_table.h:130
RTE_SWX_TABLE_MATCH_LPM
@ RTE_SWX_TABLE_MATCH_LPM
Definition: rte_swx_table.h:28
rte_swx_table_ops::mailbox_size_get
rte_swx_table_mailbox_size_get_t mailbox_size_get
Definition: rte_swx_table.h:272
rte_swx_table_entry::key_signature
uint64_t key_signature
Definition: rte_swx_table.h:91
RTE_SWX_TABLE_MATCH_WILDCARD
@ RTE_SWX_TABLE_MATCH_WILDCARD
Definition: rte_swx_table.h:25
rte_swx_table_entry::RTE_TAILQ_ENTRY
RTE_TAILQ_ENTRY(rte_swx_table_entry) node
rte_swx_table_params
Definition: rte_swx_table.h:35
rte_swx_table_ops::del
rte_swx_table_delete_t del
Definition: rte_swx_table.h:287
rte_swx_table_params::key_size
uint32_t key_size
Definition: rte_swx_table.h:40
rte_swx_table_ops::lkp
rte_swx_table_lookup_t lkp
Definition: rte_swx_table.h:290
rte_swx_table_ops
Definition: rte_swx_table.h:267
rte_swx_table_create_t
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)
Definition: rte_swx_table.h:162
rte_swx_table_delete_t
int(* rte_swx_table_delete_t)(void *table, struct rte_swx_table_entry *entry)
Definition: rte_swx_table.h:197
rte_swx_table_params::key_mask0
uint8_t * key_mask0
Definition: rte_swx_table.h:53
rte_swx_table_match_type
rte_swx_table_match_type
Definition: rte_swx_table.h:23
rte_swx_table_free_t
void(* rte_swx_table_free_t)(void *table)
Definition: rte_swx_table.h:264
rte_swx_table_add_t
int(* rte_swx_table_add_t)(void *table, struct rte_swx_table_entry *entry)
Definition: rte_swx_table.h:180
rte_swx_table_entry::action_data
uint8_t * action_data
Definition: rte_swx_table.h:111
rte_swx_table_params::action_data_size
uint32_t action_data_size
Definition: rte_swx_table.h:59
rte_swx_table_ops::footprint_get
rte_swx_table_footprint_get_t footprint_get
Definition: rte_swx_table.h:269
rte_swx_table_entry::action_id
uint64_t action_id
Definition: rte_swx_table.h:103
rte_swx_table_ops::create
rte_swx_table_create_t create
Definition: rte_swx_table.h:275
rte_swx_table_entry
Definition: rte_swx_table.h:68
rte_swx_table_entry::key
uint8_t * key
Definition: rte_swx_table.h:77
rte_swx_table_mailbox_size_get_t
uint64_t(* rte_swx_table_mailbox_size_get_t)(void)
Definition: rte_swx_table.h:145