22/05/2026 06:11, Huisong Li:
> Add a new helper function rte_lcore_is_eal_managed() to determine
> if a logical core is managed by EAL.
> 
> This interface returns true if the lcore role is either ROLE_RTE
> (standard worker/main cores) or ROLE_SERVICE (service cores).
[...]
> +RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_lcore_is_eal_managed, 26.07)
> +int rte_lcore_is_eal_managed(unsigned int lcore_id)
> +{
> +     struct rte_config *cfg = rte_eal_get_configuration();
> +
> +     if (lcore_id >= RTE_MAX_LCORE)
> +             return 0;
> +     return cfg->lcore_role[lcore_id] == ROLE_RTE ||
> +             cfg->lcore_role[lcore_id] == ROLE_SERVICE;
> +}

I'm not sure about adding this function in the API.
We already have rte_eal_lcore_role()
and I feel having this explicit ROLE_RTE || ROLE_SERVICE
in the code where needed may be less confusing.

Note: we should prefix these constants with RTE_LCORE_


Reply via email to