DPDK 21.11.9
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
26
29
32};
33
38
40 uint32_t key_size;
41
43 uint32_t key_offset;
44
53 uint8_t *key_mask0;
54
60
64 uint32_t n_keys_max;
65};
66
73
77 uint8_t *key;
78
84 uint8_t *key_mask;
85
91 uint64_t key_signature;
92
100 uint32_t key_priority;
101
103 uint64_t action_id;
104
111 uint8_t *action_data;
112};
113
115RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);
116
129typedef uint64_t
131 struct rte_swx_table_entry_list *entries,
132 const char *args);
133
144typedef uint64_t
146
161typedef void *
162(*rte_swx_table_create_t)(struct rte_swx_table_params *params,
163 struct rte_swx_table_entry_list *entries,
164 const char *args,
165 int numa_node);
166
179typedef int
180(*rte_swx_table_add_t)(void *table,
181 struct rte_swx_table_entry *entry);
182
196typedef int
197(*rte_swx_table_delete_t)(void *table,
198 struct rte_swx_table_entry *entry);
199
249typedef int
250(*rte_swx_table_lookup_t)(void *table,
251 void *mailbox,
252 uint8_t **key,
253 uint64_t *action_id,
254 uint8_t **action_data,
255 int *hit);
256
263typedef void
264(*rte_swx_table_free_t)(void *table);
265
270
273
276
282
288
291
294};
295
296#ifdef __cplusplus
297}
298#endif
299
300#endif
rte_swx_table_match_type
Definition: rte_swx_table.h:23
@ RTE_SWX_TABLE_MATCH_WILDCARD
Definition: rte_swx_table.h:25
@ RTE_SWX_TABLE_MATCH_EXACT
Definition: rte_swx_table.h:31
@ RTE_SWX_TABLE_MATCH_LPM
Definition: rte_swx_table.h:28
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)
int(* rte_swx_table_lookup_t)(void *table, void *mailbox, uint8_t **key, uint64_t *action_id, uint8_t **action_data, int *hit)
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:68
uint32_t key_priority
uint8_t * key
Definition: rte_swx_table.h:77
uint8_t * key_mask
Definition: rte_swx_table.h:84
uint8_t * action_data
uint64_t key_signature
Definition: rte_swx_table.h:91
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:37