DPDK 22.11.4
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
8extern "C" {
9#endif
10
18#include <stdint.h>
19
20#include <rte_os.h>
21
22#include "rte_swx_hash_func.h"
23
28
31
34};
35
40
42 uint32_t key_size;
43
45 uint32_t key_offset;
46
55 uint8_t *key_mask0;
56
62
68
72 uint32_t n_keys_max;
73};
74
81
85 uint8_t *key;
86
92 uint8_t *key_mask;
93
99 uint64_t key_signature;
100
108 uint32_t key_priority;
109
111 uint64_t action_id;
112
119 uint8_t *action_data;
120};
121
123RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);
124
137typedef uint64_t
139 struct rte_swx_table_entry_list *entries,
140 const char *args);
141
152typedef uint64_t
154
169typedef void *
170(*rte_swx_table_create_t)(struct rte_swx_table_params *params,
171 struct rte_swx_table_entry_list *entries,
172 const char *args,
173 int numa_node);
174
187typedef int
188(*rte_swx_table_add_t)(void *table,
189 struct rte_swx_table_entry *entry);
190
204typedef int
205(*rte_swx_table_delete_t)(void *table,
206 struct rte_swx_table_entry *entry);
207
269typedef int
270(*rte_swx_table_lookup_t)(void *table,
271 void *mailbox,
272 uint8_t **key,
273 uint64_t *action_id,
274 uint8_t **action_data,
275 size_t *entry_id,
276 int *hit);
277
284typedef void
285(*rte_swx_table_free_t)(void *table);
286
291
294
297
303
309
312
315};
316
317#ifdef __cplusplus
318}
319#endif
320
321#endif
uint32_t(* rte_swx_hash_func_t)(const void *key, uint32_t length, uint32_t seed)
rte_swx_table_match_type
Definition: rte_swx_table.h:25
@ RTE_SWX_TABLE_MATCH_WILDCARD
Definition: rte_swx_table.h:27
@ RTE_SWX_TABLE_MATCH_EXACT
Definition: rte_swx_table.h:33
@ RTE_SWX_TABLE_MATCH_LPM
Definition: rte_swx_table.h:30
int(* rte_swx_table_lookup_t)(void *table, void *mailbox, uint8_t **key, uint64_t *action_id, uint8_t **action_data, size_t *entry_id, int *hit)
int(* rte_swx_table_add_t)(void *table, struct rte_swx_table_entry *entry)
void(* rte_swx_table_free_t)(void *table)
int(* rte_swx_table_delete_t)(void *table, struct rte_swx_table_entry *entry)
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)
uint64_t(* rte_swx_table_mailbox_size_get_t)(void)
RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry)
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:76
uint32_t key_priority
uint8_t * key
Definition: rte_swx_table.h:85
uint8_t * key_mask
Definition: rte_swx_table.h:92
uint8_t * action_data
uint64_t key_signature
Definition: rte_swx_table.h:99
RTE_TAILQ_ENTRY(rte_swx_table_entry) node
uint64_t action_id
rte_swx_table_lookup_t lkp
rte_swx_table_delete_t del
rte_swx_table_mailbox_size_get_t mailbox_size_get
rte_swx_table_footprint_get_t footprint_get
rte_swx_table_add_t add
rte_swx_table_free_t free
rte_swx_table_create_t create
enum rte_swx_table_match_type match_type
Definition: rte_swx_table.h:39
rte_swx_hash_func_t hash_func
Definition: rte_swx_table.h:67