From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 10244A0509; Wed, 30 Mar 2022 11:00:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F95140685; Wed, 30 Mar 2022 11:00:35 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 45CBC4013F for ; Wed, 30 Mar 2022 11:00:34 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 24DB6201CBC6; Wed, 30 Mar 2022 02:00:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 24DB6201CBC6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1648630833; bh=Ud85rcN6DlX7dB/obaQN14O4Y5ZPSYhEBQ9leDVgAoc=; h=From:To:Cc:Subject:Date:From; b=gixgfh7KK0LDxR1ZhSvVA7OCwoRIecaKZZT4XwmKcKQYUARcwSvV9b9GCqxkNsGFm mPFYV3iQ9eIWEYNO0bFfiGCsj15CqORvvS/ijqbg7InzRg2LGgBrBeVySvTtBO/EaZ /Peyq/2n1CQOIUkKdfl3IQdDmtRxGNLIil8x+2jM= From: Tyler Retzlaff To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, Tyler Retzlaff Subject: [PATCH] eal/windows: set Windows main lcore affinitization Date: Wed, 30 Mar 2022 02:00:29 -0700 Message-Id: <1648630829-4372-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org add missing code to affinitize main_lcore from lcore configuration. Signed-off-by: Tyler Retzlaff --- 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