diff options
| author | Yogesh Jangra <[email protected]> | 2023-03-09 13:58:42 +0000 |
|---|---|---|
| committer | Thomas Monjalon <[email protected]> | 2023-03-10 18:06:46 +0100 |
| commit | 44bcb29f5c1b5b5af1942dee58ba16fba78c35f0 (patch) | |
| tree | 14a5a27b7b7c0c570322f900a4b9cbeff78f28c1 /lib/table | |
| parent | 2cd7722a75c9d2694c2f7df7925684f151818508 (diff) | |
table: fix action selector group size log2 setting
The incorrect variable for the number of groups was used, so in the
case of values not power of 2 the incorrect result was produced.
Fixes: f7598a62d114 ("table: support selector table")
Cc: [email protected]
Signed-off-by: Yogesh Jangra <[email protected]>
Acked-by: Cristian Dumitrescu <[email protected]>
Diffstat (limited to 'lib/table')
| -rw-r--r-- | lib/table/rte_swx_table_selector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/table/rte_swx_table_selector.c b/lib/table/rte_swx_table_selector.c index ad99f18453..18e021fe6f 100644 --- a/lib/table/rte_swx_table_selector.c +++ b/lib/table/rte_swx_table_selector.c @@ -232,7 +232,7 @@ table_params_copy(struct table *t, struct rte_swx_table_selector_params *params) t->params.n_members_per_group_max = rte_align32pow2(params->n_members_per_group_max); for (i = 0; i < 32; i++) - if (params->n_members_per_group_max == 1U << i) + if (t->params.n_members_per_group_max == 1U << i) t->n_members_per_group_max_log2 = i; /* t->params.selector_mask */ |
