On Sun, 22 Mar 2026 15:42:15 +0000
Vladimir Medvedkin <[email protected]> wrote:

>  
> +     /* Allocate VRF IDs array for lookups if using multiple VRFs */
> +     if (config.nb_vrfs > 1) {
> +             vrf_ids = rte_malloc(NULL, sizeof(uint16_t) * 
> config.nb_lookup_ips, 0);


Since this won't be shared across processes, use regular malloc, not hugepages.

> +             if (vrf_ids == NULL) {
> +                     printf("Can not alloc VRF IDs array\n");
> +                     return -ENOMEM;
> +             }
> +             /* Generate random VRF IDs for each lookup */
> +             for (i = 0; i < config.nb_lookup_ips; i++)
> +                     vrf_ids[i] = rte_rand() % config.nb_vrfs;
> +     

Use rte_rand_max here.

Reply via email to