DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal/windows: set Windows main lcore affinitization
@ 2022-03-30  9:00 Tyler Retzlaff
  2022-04-07 13:14 ` David Marchand
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tyler Retzlaff @ 2022-03-30  9:00 UTC (permalink / raw)
  To: dev; +Cc: dmitry.kozliuk, Tyler Retzlaff

add missing code to affinitize main_lcore from lcore configuration.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/windows/eal.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
index ca3c41a..9c61780 100644
--- a/lib/eal/windows/eal.c
+++ b/lib/eal/windows/eal.c
@@ -401,6 +401,12 @@ enum rte_proc_type_t
 		return -1;
 	}
 
+	if (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
+			&lcore_config[config->main_lcore].cpuset) != 0) {
+		rte_eal_init_alert("Cannot set affinity");
+		rte_errno = EINVAL;
+		return -1;
+	}
 	__rte_thread_init(config->main_lcore,
 		&lcore_config[config->main_lcore].cpuset);
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-25  8:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30  9:00 [PATCH] eal/windows: set Windows main lcore affinitization Tyler Retzlaff
2022-04-07 13:14 ` David Marchand
2022-04-12 16:30   ` Tyler Retzlaff
2022-04-14  9:50     ` David Marchand
2022-04-14 12:40 ` [PATCH v2] " Tyler Retzlaff
2022-04-14 12:43 ` [PATCH v3] " Tyler Retzlaff
2022-04-14 13:08   ` David Marchand
2022-04-25  8:28     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).