DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Marko Kovacevic <marko.kovacevic@intel.com>
Cc: dev@dpdk.org, john.mcnamara@intel.com, vipin.varghese@intel.com
Subject: Re: [dpdk-dev] [PATCH v1] doc: update definition of lcore id and lcore index
Date: Thu, 1 Feb 2018 15:04:51 +0000	[thread overview]
Message-ID: <20180201150451.GA15912@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <20180131164646.16603-1-marko.kovacevic@intel.com>

On Wed, Jan 31, 2018 at 04:46:46PM +0000, Marko Kovacevic wrote:
> Added examples in lcore index for better
> explanation on various examples,
> Sited examples for lcore id.
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> ---
>  lib/librte_eal/common/include/rte_lcore.h | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h
> index d84bcff..349ac36 100644
> --- a/lib/librte_eal/common/include/rte_lcore.h
> +++ b/lib/librte_eal/common/include/rte_lcore.h
> @@ -57,7 +57,9 @@ RTE_DECLARE_PER_LCORE(unsigned, _lcore_id);  /**< Per thread "lcore id". */
>  RTE_DECLARE_PER_LCORE(rte_cpuset_t, _cpuset); /**< Per thread "cpuset". */
>  
>  /**
> - * Return the ID of the execution unit we are running on.
> + * Return the Application thread ID of the execution unit.
> + * If option '-l' or '-c' is provided the lcore ID is the actual
> + * CPU ID.

Good idea to clarify this!
I'd suggest the second sentence might do with being reworked a little
though - the lcore ID will also be the processor id even if no args i.e.
no -c or -l arguments are passed.

How about:
 * Note: in most cases the lcore id returned here will also correspond
 *   to the processor id of the CPU on which the thread is pinned, this
 *   will not be the case if the user has explicitly changed the thread to
 *   core affinities using --lcores EAL argument e.g. --lcores '(0-3)@10'
 *   to run threads with lcore IDs 0, 1, 2 and 3 on physical core 10.

It's longer, I know, but hopefully a bit clearer for the user.

/Bruce

  reply	other threads:[~2018-02-01 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 16:46 Marko Kovacevic
2018-02-01 15:04 ` Bruce Richardson [this message]
2018-02-01 16:53 ` [dpdk-dev] [PATCH v2] " Marko Kovacevic
2018-02-02 15:02   ` [dpdk-dev] [PATCH v3] " Marko Kovacevic
2018-02-06 12:28     ` Mcnamara, John
2018-02-06 21:11       ` 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=20180201150451.GA15912@bricha3-MOBL3.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=vipin.varghese@intel.com \
    /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).