DPDK 22.11.7
rte_swx_table_selector.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_SELECTOR_H__
5#define __INCLUDE_RTE_SWX_TABLE_SELECTOR_H__
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
18#include <stdint.h>
19
20#include <rte_compat.h>
21
22#include "rte_swx_table.h"
23
28
30 uint32_t selector_size;
31
34
43 uint8_t *selector_mask;
44
47
49 uint32_t n_groups_max;
50
53};
54
59
61 uint32_t member_id;
62
64 uint32_t member_weight;
65};
66
68RTE_TAILQ_HEAD(rte_swx_table_selector_member_list, rte_swx_table_selector_member);
69
73 struct rte_swx_table_selector_member_list members;
74};
75
86__rte_experimental
87uint64_t
88rte_swx_table_selector_footprint_get(uint32_t n_groups_max, uint32_t n_members_per_group_max);
89
100__rte_experimental
101uint64_t
103
118__rte_experimental
119void *
121 struct rte_swx_table_selector_group **groups,
122 int numa_node);
123
138__rte_experimental
139int
141 uint32_t group_id,
142 struct rte_swx_table_selector_group *group);
143
180__rte_experimental
181int
183 void *mailbox,
184 uint8_t **group_id_buffer,
185 uint8_t **selector_buffer,
186 uint8_t **member_id_buffer);
187
194__rte_experimental
195void
197
198#ifdef __cplusplus
199}
200#endif
201
202#endif
__rte_experimental void * rte_swx_table_selector_create(struct rte_swx_table_selector_params *params, struct rte_swx_table_selector_group **groups, int numa_node)
__rte_experimental int rte_swx_table_selector_group_set(void *table, uint32_t group_id, struct rte_swx_table_selector_group *group)
__rte_experimental int rte_swx_table_selector_select(void *table, void *mailbox, uint8_t **group_id_buffer, uint8_t **selector_buffer, uint8_t **member_id_buffer)
__rte_experimental void rte_swx_table_selector_free(void *table)
RTE_TAILQ_HEAD(rte_swx_table_selector_member_list, rte_swx_table_selector_member)
__rte_experimental uint64_t rte_swx_table_selector_mailbox_size_get(void)
__rte_experimental uint64_t rte_swx_table_selector_footprint_get(uint32_t n_groups_max, uint32_t n_members_per_group_max)
struct rte_swx_table_selector_member_list members
RTE_TAILQ_ENTRY(rte_swx_table_selector_member) node