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