DPDK  20.11.3
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 
93  uint64_t action_id;
94 
100  uint8_t *action_data;
101 };
102 
104 TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);
105 
118 typedef uint64_t
120  struct rte_swx_table_entry_list *entries,
121  const char *args);
122 
133 typedef uint64_t
135 
150 typedef void *
151 (*rte_swx_table_create_t)(struct rte_swx_table_params *params,
152  struct rte_swx_table_entry_list *entries,
153  const char *args,
154  int numa_node);
155 
168 typedef int
169 (*rte_swx_table_add_t)(void *table,
170  struct rte_swx_table_entry *entry);
171 
185 typedef int
186 (*rte_swx_table_delete_t)(void *table,
187  struct rte_swx_table_entry *entry);
188 
238 typedef int
239 (*rte_swx_table_lookup_t)(void *table,
240  void *mailbox,
241  uint8_t **key,
242  uint64_t *action_id,
243  uint8_t **action_data,
244  int *hit);
245 
252 typedef void
253 (*rte_swx_table_free_t)(void *table);
254 
259 
262 
265 
271 
277 
280 
283 };
284 
285 #ifdef __cplusplus
286 }
287 #endif
288 
289 #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
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
Definition: rte_swx_table.h:93
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