On Fri, 11 Oct 2024 18:17:00 +0000
Vladimir Medvedkin <vladimir.medved...@intel.com> wrote:

> +
> +uint32_t
> +rte_thash_get_rand_poly(uint32_t poly_degree)
> +{
> +     uint32_t ret_poly;
> +
> +     if (poly_degree > 32)
> +             return 0;
> +
> +     do
> +             ret_poly = __thash_get_rand_poly(poly_degree);
> +     while (thash_test_poly_order(ret_poly, poly_degree));

Unbounded loop adds some risk, should there be an upper limit on retries.

> +
> +     return ret_poly;
> +}
> diff --git a/lib/hash/version.map b/lib/hash/version.map
> index 4f13f1d5aa..7ce6ab1121 100644
> --- a/lib/hash/version.map
> +++ b/lib/hash/version.map
> @@ -61,4 +61,5 @@ INTERNAL {
>  
>       rte_thash_gfni_stub;
>       rte_thash_gfni_bulk_stub;
> +     rte_thash_get_rand_poly;

Why does this function need to be moved to its own file?
Only used in one place in rte_thash.c.

Reply via email to