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 124E4A034F; Fri, 25 Jun 2021 02:27:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C5C640040; Fri, 25 Jun 2021 02:27:34 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 83CE04003C for ; Fri, 25 Jun 2021 02:27:33 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1059) id 812AB20B6C50; Thu, 24 Jun 2021 17:27:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 812AB20B6C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1624580852; bh=BV+79asjBaAp8/vGdQVwJ2d1IPGs+eulw2kKb2z6Tg8=; h=From:To:Cc:Subject:Date:From; b=HW/pq3F1D7arS6RKRDLoaBAlG5ErnDpEz0jkbJ4x5vLFnBdmuKa53+MBf3W1CBnmr y1niv+ty8oBXqVLX3QuPcdzMMXBO6wnw7pwR7lQqvWeEJD0CzbqMc4yM01Uczw2uLi VHNpV4HtGYitr8LieD6cjtjnL9eZmAuaYZp5oQ1I= From: Narcisa Ana Maria Vasile To: dev@dpdk.org, thomas@monjalon.net, dmitry.kozliuk@gmail.com, ocardona@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, dmitrym@microsoft.com Cc: Narcisa Vasile Date: Thu, 24 Jun 2021 17:27:23 -0700 Message-Id: <1624580843-4521-1-git-send-email-navasile@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] eal/windows: ensure all the CPUs in the set are checked 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 Sender: "dev" From: Narcisa Vasile Fix count_cpu() to ensure it iterates through all the CPUs in a set. count_cpu() iterates through the CPUs in the set 's' and counts the selected ones. Previously, it was incorrectly using the number of CPUSETS to iterate through the CPUs. Signed-off-by: Narcisa Vasile --- lib/eal/windows/include/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eal/windows/include/sched.h b/lib/eal/windows/include/sched.h index ff572b5dcb..bc31cc8465 100644 --- a/lib/eal/windows/include/sched.h +++ b/lib/eal/windows/include/sched.h @@ -49,7 +49,7 @@ count_cpu(rte_cpuset_t *s) unsigned int _i; int count = 0; - for (_i = 0; _i < _NUM_SETS(CPU_SETSIZE); _i++) + for (_i = 0; _i < CPU_SETSIZE; _i++) if (CPU_ISSET(_i, s) != 0LL) count++; return count; -- 2.31.0.vfs.0.1