From 269be3f974c22f62892554dbb51fe859047058d7 Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Fri, 14 Jan 2022 11:11:08 +0800
Subject: [PATCH] fix master thread not set affinity

---
 lib/eal/linux/eal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 123a8e8..7ca8bb2 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1310,7 +1310,7 @@ rte_eal_init(int argc, char **argv)
 	eal_check_mem_on_local_socket();
 
 	/* Master thread don't set affinity in LibStorage application */
-	if (strstr(logid, "LibStorage") != NULL &&
+	if (strstr(logid, "LibStorage") == NULL &&
 		pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
 			&lcore_config[config->main_lcore].cpuset) != 0) {
 		rte_eal_init_alert("Cannot set affinity");
-- 
2.30.0

