| rte_swx_table.h(3) | Library Functions Manual | rte_swx_table.h(3) |
rte_swx_table.h
#include <stdint.h>
#include <rte_os.h>
#include 'rte_swx_hash_func.h'
struct rte_swx_table_params
struct rte_swx_table_entry
struct rte_swx_table_ops
typedef uint64_t(* rte_swx_table_footprint_get_t)
(struct rte_swx_table_params *params, struct rte_swx_table_entry_list
*entries, const char *args)
typedef uint64_t(* rte_swx_table_mailbox_size_get_t) (void)
typedef 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)
typedef int(* rte_swx_table_add_t) (void *table, struct
rte_swx_table_entry *entry)
typedef int(* rte_swx_table_delete_t) (void *table, struct
rte_swx_table_entry *entry)
typedef 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)
typedef void(* rte_swx_table_free_t) (void *table)
enum rte_swx_table_match_type {
RTE_SWX_TABLE_MATCH_WILDCARD, RTE_SWX_TABLE_MATCH_LPM,
RTE_SWX_TABLE_MATCH_EXACT }
RTE_TAILQ_HEAD (rte_swx_table_entry_list,
rte_swx_table_entry)
RTE SWX Table
Table interface.
Definition in file rte_swx_table.h.
Table memory footprint get
Parameters
Returns
Definition at line 133 of file rte_swx_table.h.
Table mailbox size get
The mailbox is used to store the context of a lookup operation that is in progress and it is passed as a parameter to the lookup operation. This allows for multiple concurrent lookup operations into the same table.
Returns
Definition at line 148 of file rte_swx_table.h.
Table create
Parameters
Returns
Definition at line 165 of file rte_swx_table.h.
Table entry add
Parameters
Returns
Definition at line 183 of file rte_swx_table.h.
Table entry delete
Parameters
Returns
Definition at line 200 of file rte_swx_table.h.
Table lookup
The table lookup operation searches a given key in the table and upon its completion it returns an indication of whether the key is found in the table (lookup hit) or not (lookup miss). In case of lookup hit, the action_id and the action_data associated with the key are also returned.
Multiple invocations of this function may be required in order to complete a single table lookup operation for a given table and a given lookup key. The completion of the table lookup operation is flagged by a return value of 1; in case of a return value of 0, the function must be invoked again with exactly the same arguments.
The mailbox argument is used to store the context of an on-going table lookup operation. The mailbox mechanism allows for multiple concurrent table lookup operations into the same table.
The typical reason an implementation may choose to split the table lookup operation into multiple steps is to hide the latency of the inherent memory read operations: before a read operation with the source data likely not in the CPU cache, the source data prefetch is issued and the table lookup operation is postponed in favor of some other unrelated work, which the CPU executes in parallel with the source data being fetched into the CPU cache; later on, the table lookup operation is resumed, this time with the source data likely to be read from the CPU cache with no CPU pipeline stall, which significantly improves the table lookup performance.
The table entry consists of the action ID and the action data. Each table entry is unique, although different table entries can have identical content, i.e. same values for the action ID and the action data. The table entry ID is also returned by the table lookup operation. It can be used to index into an external array of resources such as counters, registers or meters to identify the resource directly associated with the current table entry with no need to store the corresponding index into the table entry. The index of the external resource is thus auto-generated instead of being stored in the table entry.
Parameters
Returns
Definition at line 265 of file rte_swx_table.h.
Table free
Parameters
Definition at line 280 of file rte_swx_table.h.
Match type.
Enumerator
Definition at line 21 of file rte_swx_table.h.
List of table entries.
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |