eal: fix control threads pinnning
pthread_setaffinity_np returns a >0 value on error.
We could end up letting the ctrl threads on the current process cpu
affinity.
Fixes: d651ee4919
("eal: set affinity for control threads")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
parent
b206376438
commit
759b9be661
@ -209,7 +209,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
|
||||
CPU_SET(rte_get_master_lcore(), &cpuset);
|
||||
|
||||
ret = pthread_setaffinity_np(*thread, sizeof(cpuset), &cpuset);
|
||||
if (ret < 0)
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
ret = pthread_barrier_wait(¶ms->configured);
|
||||
|
Loading…
Reference in New Issue
Block a user