DPDK 22.11.5
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
8extern "C" {
9#endif
10
49#include <stdint.h>
50#include <sys/types.h>
51
52#include <rte_compat.h>
53
54#include "rte_swx_hash_func.h"
55
57#ifndef RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX
58#define RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX 16
59#endif
60
64 uint32_t key_size;
65
67 uint32_t key_offset;
68
76 uint8_t *key_mask0;
77
82
86
88 uint32_t n_keys_max;
89
94 uint32_t *key_timeout;
95
100};
101
110__rte_experimental
111uint64_t
113
124__rte_experimental
125uint64_t
127
138__rte_experimental
139void *
141
155__rte_experimental
156int
158 uint32_t key_timeout_id,
159 uint32_t key_timeout);
160
209__rte_experimental
210int
212 void *mailbox,
213 uint64_t time,
214 uint8_t **key,
215 uint64_t *action_id,
216 uint8_t **action_data,
217 size_t *entry_id,
218 int *hit);
219
242__rte_experimental
243uint32_t
245 void *mailbox,
246 uint64_t time,
247 uint64_t action_id,
248 uint8_t *action_data,
249 uint32_t key_timeout_id);
250
264__rte_experimental
265void
267 void *mailbox,
268 uint64_t time);
269
285__rte_experimental
286void
288 void *mailbox,
289 uint64_t time,
290 uint32_t key_timeout_id);
291
304__rte_experimental
305void
307 void *mailbox);
308
315__rte_experimental
316void
318
319#ifdef __cplusplus
320}
321#endif
322
323#endif
uint32_t(* rte_swx_hash_func_t)(const void *key, uint32_t length, uint32_t seed)
__rte_experimental void * rte_swx_table_learner_create(struct rte_swx_table_learner_params *params, int numa_node)
__rte_experimental uint32_t rte_swx_table_learner_add(void *table, void *mailbox, uint64_t time, uint64_t action_id, uint8_t *action_data, uint32_t key_timeout_id)
__rte_experimental uint64_t rte_swx_table_learner_footprint_get(struct rte_swx_table_learner_params *params)
__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, size_t *entry_id, int *hit)
__rte_experimental void rte_swx_table_learner_rearm_new(void *table, void *mailbox, uint64_t time, uint32_t key_timeout_id)
__rte_experimental void rte_swx_table_learner_free(void *table)
__rte_experimental void rte_swx_table_learner_delete(void *table, void *mailbox)
__rte_experimental uint64_t rte_swx_table_learner_mailbox_size_get(void)
__rte_experimental int rte_swx_table_learner_timeout_update(void *table, uint32_t key_timeout_id, uint32_t key_timeout)
__rte_experimental void rte_swx_table_learner_rearm(void *table, void *mailbox, uint64_t time)