[dpdk-dev] [PATCH] eal: return -1 if rte_lcore_index called from non-DPDK thread

David Marchand david.marchand at redhat.com
Tue Jul 7 13:46:13 CEST 2020


On Wed, Apr 8, 2020 at 10:24 PM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> If rte_lcore_index() is asked to give the index of the
> current lcore (argument -1) and is called from a non-DPDK thread
> then it would invalid result. The result would come
> lcore_config[-1].core_index which is some other data in the
> per-thread area.
>
> The resolution is to return -1 which is what rte_lcore_index()
> returns if handed an invalid lcore.
>
> Same issue existed with rte_lcore_to_cpu_id().
>
> Bugzilla ID: 446
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>

Acked-by: David Marchand <david.marchand at redhat.com>

Applied, thanks.


-- 
David Marchand



More information about the dev mailing list