DPDK  21.11.8
rte_swx_table_learner.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2021 Intel Corporation
3  */
4 #ifndef __INCLUDE_RTE_SWX_TABLE_LEARNER_H__
5 #define __INCLUDE_RTE_SWX_TABLE_LEARNER_H__
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
24 #include <stdint.h>
25 #include <sys/queue.h>
26 
27 #include <rte_compat.h>
28 
32  uint32_t key_size;
33 
35  uint32_t key_offset;
36 
44  uint8_t *key_mask0;
45 
49  uint32_t action_data_size;
50 
52  uint32_t n_keys_max;
53 
57  uint32_t key_timeout;
58 };
59 
68 __rte_experimental
69 uint64_t
71 
82 __rte_experimental
83 uint64_t
85 
96 __rte_experimental
97 void *
98 rte_swx_table_learner_create(struct rte_swx_table_learner_params *params, int numa_node);
99 
137 __rte_experimental
138 int
139 rte_swx_table_learner_lookup(void *table,
140  void *mailbox,
141  uint64_t time,
142  uint8_t **key,
143  uint64_t *action_id,
144  uint8_t **action_data,
145  int *hit);
146 
167 __rte_experimental
168 uint32_t
169 rte_swx_table_learner_add(void *table,
170  void *mailbox,
171  uint64_t time,
172  uint64_t action_id,
173  uint8_t *action_data);
174 
187 __rte_experimental
188 void
189 rte_swx_table_learner_delete(void *table,
190  void *mailbox);
191 
198 __rte_experimental
199 void
200 rte_swx_table_learner_free(void *table);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif
__rte_experimental uint64_t rte_swx_table_learner_mailbox_size_get(void)
__rte_experimental void rte_swx_table_learner_delete(void *table, void *mailbox)
__rte_experimental void * rte_swx_table_learner_create(struct rte_swx_table_learner_params *params, int numa_node)
__rte_experimental void rte_swx_table_learner_free(void *table)
__rte_experimental int rte_swx_table_learner_lookup(void *table, void *mailbox, uint64_t time, uint8_t **key, uint64_t *action_id, uint8_t **action_data, int *hit)
__rte_experimental uint64_t rte_swx_table_learner_footprint_get(struct rte_swx_table_learner_params *params)
__rte_experimental uint32_t rte_swx_table_learner_add(void *table, void *mailbox, uint64_t time, uint64_t action_id, uint8_t *action_data)