DPDK patches and discussions
 help / color / mirror / Atom feed
From: Marko Kovacevic <marko.kovacevic@intel.com>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, vipin.varghese@intel.com,
	bruce.richardson@intel.com,
	Marko Kovacevic <marko.kovacevic@intel.com>
Subject: [dpdk-dev] [PATCH v2] doc: update definition of lcore id and lcore index
Date: Thu,  1 Feb 2018 16:52:40 +0000	[thread overview]
Message-ID: <20180201165240.15602-1-marko.kovacevic@intel.com> (raw)

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>

---
V2:
 - Added clearer description to lcore id - Bruce
 - Reframed examples for lcore index - Bruce
---
 lib/librte_eal/common/include/rte_lcore.h | 14 ++++++++++++--
 1 file changed, 12 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..44c5780 100644
--- a/lib/librte_eal/common/include/rte_lcore.h
+++ b/lib/librte_eal/common/include/rte_lcore.h
@@ -57,7 +57,12 @@ 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. If option '--lcore' is provided the lcore ID is the
+ * index starting from 0.
+ *
  * @return
  *  Logical core ID (in EAL thread) or LCORE_ID_ANY (in non-EAL thread)
  */
@@ -94,7 +99,12 @@ rte_lcore_count(void)
 
 /**
  * Return the index of the lcore starting from zero.
- * The order is physical or given by command line (-l option).
+ *
+ * When option -c or -l is given, the index corresponds
+ * to the order in the list.
+ * For example:
+ * -c 0x30, lcore 4 has index 0, and 5 has index 1.
+ * -l 22,18 lcore 22 has index 0, and 18 has index 1.
  *
  * @param lcore_id
  *   The targeted lcore, or -1 for the current one.
-- 
2.9.5

             reply	other threads:[~2018-02-01 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 16:52 Marko Kovacevic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-31 16:46 [dpdk-dev] [PATCH v1] " Marko Kovacevic
2018-02-01 16:53 ` [dpdk-dev] [PATCH v2] " Marko Kovacevic

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=20180201165240.15602-1-marko.kovacevic@intel.com \
    --to=marko.kovacevic@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@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).