DPDK 24.11.2
 
Loading...
Searching...
No Matches
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
13
14#include <stdint.h>
15
16#include <rte_os.h>
17
18#include "rte_swx_hash_func.h"
19
31
70
77
81 uint8_t *key;
82
88 uint8_t *key_mask;
89
95 uint64_t key_signature;
96
104 uint32_t key_priority;
105
107 uint64_t action_id;
108
115 uint8_t *action_data;
116};
117
119RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);
120
133typedef uint64_t
135 struct rte_swx_table_entry_list *entries,
136 const char *args);
137
148typedef uint64_t
150
165typedef void *
166(*rte_swx_table_create_t)(struct rte_swx_table_params *params,
167 struct rte_swx_table_entry_list *entries,
168 const char *args,
169 int numa_node);
170
183typedef int
184(*rte_swx_table_add_t)(void *table,
185 struct rte_swx_table_entry *entry);
186
200typedef int
201(*rte_swx_table_delete_t)(void *table,
202 struct rte_swx_table_entry *entry);
203
265typedef int
266(*rte_swx_table_lookup_t)(void *table,
267 void *mailbox,
268 uint8_t **key,
269 uint64_t *action_id,
270 uint8_t **action_data,
271 size_t *entry_id,
272 int *hit);
273
280typedef void
281(*rte_swx_table_free_t)(void *table);
282
312
313#endif
uint32_t(* rte_swx_hash_func_t)(const void *key, uint32_t length, uint32_t seed)
rte_swx_table_match_type
@ RTE_SWX_TABLE_MATCH_WILDCARD
@ RTE_SWX_TABLE_MATCH_EXACT
@ RTE_SWX_TABLE_MATCH_LPM
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)
uint32_t key_priority
uint8_t * key
uint8_t * key_mask
uint8_t * action_data
uint64_t key_signature
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
rte_swx_hash_func_t hash_func