From: David Marchand Date: Tue, 19 Feb 2019 20:41:10 +0000 (+0100) Subject: eal: fix control threads pinnning X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=759b9be661222768356ee50d8d15dc4d33646432;p=dpdk.git 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: d651ee4919cd ("eal: set affinity for control threads") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Anatoly Burakov Reviewed-by: Olivier Matz --- diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c index 48ef4d6de6..a3985ce866 100644 --- a/lib/librte_eal/common/eal_common_thread.c +++ b/lib/librte_eal/common/eal_common_thread.c @@ -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);