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 30C9BA0547; Fri, 25 Jun 2021 10:36:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D47DB40698; Fri, 25 Jun 2021 10:36:26 +0200 (CEST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mails.dpdk.org (Postfix) with ESMTP id EBD164068A for ; Fri, 25 Jun 2021 10:36:24 +0200 (CEST) Received: by mail-lf1-f46.google.com with SMTP id u13so15064754lfk.2 for ; Fri, 25 Jun 2021 01:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BMA1tSGZOecCTY4+d7xLOkgJ52pLDdtnJI7U8LKO+5o=; b=Q3b00IHUd3pC3SyRTr8lvskEE4uKBhtXNyiKwMHmEeFDkuYoyircOWuSKmpjM0mZS4 9ZhtbNIXGR1Vg+Qx0RBNFYnfQT0iU42DECYaJkvWeit+eFF145ljIJ/j0oPNOwCjxuZL eclaJo9gfzYpkGmkBx+/DhJYkw2szOlPSxtk8NT8yJ9duBLsd1FqagYjv0HzbAG79QWW TME52h7qJGhKdOd1EZtJW+J0SUFh3JvKSn8B0uWty+069yLroEjJuzWQVukWYOy4GUQM Bz0LLWmekhCfiDSJKpAS+bVgKVogZ/WJ6J8oU1E8ZdUdxYZUZ2M0dbp6SRHg5uH/Xdvp zyMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BMA1tSGZOecCTY4+d7xLOkgJ52pLDdtnJI7U8LKO+5o=; b=QdP3S5IePan5wx/TYQ/29Ad9A9+vQ8Jws5S6OxaPf9sAai66J8Ql13VhMivNQmNrE6 xuKPoxm9OpFmDaZ7Yakkr6ysf8BdR8McfSl64RsLh87JO3S0Gop0NvPe+Iq1NgtCfqdp IM7qsT2n1HRDmJd8wOSdMXxubd0WSjnF2uEcdk6d5TZCJEAAgNssO3LmdlvkgyAWXEhx SDjeUYSAKWfKNzp5iozlq8ttEpElkxqoYpj2nB+hCP+aFD1cguoE84PLyrb4kaxPTNm+ ISNNqFfaPsWxZj7qHVtJiedZ4I5RlTlTdzlpYi6lo1d1ieZo/pezWjwi9oWO3U30rV2M EhdA== X-Gm-Message-State: AOAM532Cz7CSCaFaWCOre3rYzitDTXumQy1yUZQznDv9dyYGX7lscKs1 uuVrO4D+iBw5jDTH9JOZjj8= X-Google-Smtp-Source: ABdhPJzcJNjtWLS9mKaG+xd/S7rQAN5qJ/y9gZZB7UzSfeEXZUP+src6vJJucBgVZtpxyRCUjgbrkg== X-Received: by 2002:a19:ae17:: with SMTP id f23mr7411588lfc.301.1624610184318; Fri, 25 Jun 2021 01:36:24 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id bp27sm451985lfb.107.2021.06.25.01.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 01:36:23 -0700 (PDT) Date: Fri, 25 Jun 2021 11:36:21 +0300 From: Dmitry Kozlyuk To: Narcisa Ana Maria Vasile Cc: dev@dpdk.org, thomas@monjalon.net, ocardona@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, dmitrym@microsoft.com, Narcisa Vasile Message-ID: <20210625113621.13bd39ae@sovereign> In-Reply-To: <1624580843-4521-1-git-send-email-navasile@linux.microsoft.com> References: <1624580843-4521-1-git-send-email-navasile@linux.microsoft.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [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" 2021-06-24 17:27 (UTC-0700), Narcisa Ana Maria Vasile: > 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; Hi Naty, Thank you for the fix, but we also need a proper commit message: https://doc.dpdk.org/guides/contributing/patches.html#commit-messages-body Specifically, please, describe what was the observable issue (usually first comes what was wrong, then how it is fixed now) and add "Fixes" tag and Cc. Also, "number of CPUSETS" sounds unclear, as there's no "CPUSET". Suggestion: "number of bitset limbs" or maybe if you describe what was wrong with the result you won't need to describe its reason precisely at all.