fix master thread not set affinity

This commit is contained in:
wuchangsheng 2022-01-14 11:19:01 +08:00
parent 7148be9e98
commit 731c8e8755
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
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

View File

@ -1,6 +1,6 @@
Name: dpdk
Version: 21.11
Release: 4
Release: 5
Packager: packaging@6wind.com
URL: http://dpdk.org
%global source_version 21.11
@ -22,6 +22,7 @@ Patch9013: 0013-fix-rte-eal-memory-init-double-unlock.patch
Patch9014: 0014-fix-last-argv-pointer-change-to-first.patch
Patch9015: 0015-fix-internal-cfg-and-fbarray-attach-mememory-leak.patch
Patch9016: 0016-fix-error-that-the-secondary-attach-fails-due-to-detach.patch
Patch9017: 0017-fix-master-thread-not-set-affinity.patch
Summary: Data Plane Development Kit core
Group: System Environment/Libraries
@ -127,6 +128,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
/usr/sbin/depmod
%changelog
* Fri Jan 14 2022 wuchangsheng <wuchangsheng2@huawei.com> - 21.11-5
- fix master thread not set affinity
* Wed Jan 12 2022 jiangheng <jiangheng12@huawei.com> - 21.11-4
- modify location of header and library Files