DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>
Cc: dev@dpdk.org, thomas@monjalon.net, ocardona@microsoft.com,
	pallavi.kadam@intel.com, talshn@nvidia.com,
	dmitrym@microsoft.com, Narcisa Vasile <navasile@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH] eal/windows: ensure all the CPUs in the set are checked
Date: Fri, 25 Jun 2021 11:36:21 +0300	[thread overview]
Message-ID: <20210625113621.13bd39ae@sovereign> (raw)
In-Reply-To: <1624580843-4521-1-git-send-email-navasile@linux.microsoft.com>

2021-06-24 17:27 (UTC-0700), Narcisa Ana Maria Vasile:
> From: Narcisa Vasile <navasile@microsoft.com>
> 
> 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 <navasile@microsoft.com>
> ---
>  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.

  reply	other threads:[~2021-06-25  8:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  0:27 Narcisa Ana Maria Vasile
2021-06-25  8:36 ` Dmitry Kozlyuk [this message]
2021-06-30  2:02   ` Narcisa Ana Maria Vasile
2021-06-30  1:56 ` [dpdk-dev] [PATCH v2] eal/windows: ensure all enabled CPUs are counted Narcisa Ana Maria Vasile
2021-08-04 14:56   ` Dmitry Kozlyuk
2021-08-04 20:40   ` Kadam, Pallavi
2021-08-18 13:46   ` [dpdk-dev] [PATCH v3] " Narcisa Ana Maria Vasile
2021-10-08 23:56     ` Narcisa Ana Maria Vasile
2021-10-11 18:48     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210625113621.13bd39ae@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=dmitrym@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=navasile@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).