DPDK  22.03.0
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 
26 #include <rte_compat.h>
27 
31  uint32_t key_size;
32 
34  uint32_t key_offset;
35 
43  uint8_t *key_mask0;
44 
48  uint32_t action_data_size;
49 
51  uint32_t n_keys_max;
52 
56  uint32_t key_timeout;
57 };
58 
67 __rte_experimental
68 uint64_t
70 
81 __rte_experimental
82 uint64_t
84 
95 __rte_experimental
96 void *
97 rte_swx_table_learner_create(struct rte_swx_table_learner_params *params, int numa_node);
98 
136 __rte_experimental
137 int
138 rte_swx_table_learner_lookup(void *table,
139  void *mailbox,
140  uint64_t time,
141  uint8_t **key,
142  uint64_t *action_id,
143  uint8_t **action_data,
144  int *hit);
145 
166 __rte_experimental
167 uint32_t
168 rte_swx_table_learner_add(void *table,
169  void *mailbox,
170  uint64_t time,
171  uint64_t action_id,
172  uint8_t *action_data);
173 
186 __rte_experimental
187 void
188 rte_swx_table_learner_delete(void *table,
189  void *mailbox);
190 
197 __rte_experimental
198 void
199 rte_swx_table_learner_free(void *table);
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #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)