examples/multi_process: do not dereference global config struct

Prefer the existing apis rather than direct access the configuration
structure.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
David Marchand 2019-05-15 09:54:21 +02:00 committed by Thomas Monjalon
parent 9c6b199354
commit 200bc52e5a

View File

@ -271,7 +271,7 @@ static void
assign_ports_to_cores(void)
{
const unsigned lcores = rte_eal_get_configuration()->lcore_count;
const unsigned int lcores = rte_lcore_count();
const unsigned port_pairs = num_ports / 2;
const unsigned pairs_per_lcore = port_pairs / lcores;
unsigned extra_pairs = port_pairs % lcores;