From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 0D5801B7DF for ; Wed, 31 Jan 2018 17:47:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 08:47:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,440,1511856000"; d="scan'208";a="15909179" Received: from silpixa00399502.ir.intel.com (HELO silpixa00399502.ger.corp.intel.com) ([10.237.223.218]) by fmsmga002.fm.intel.com with ESMTP; 31 Jan 2018 08:47:07 -0800 From: Marko Kovacevic To: dev@dpdk.org Cc: john.mcnamara@intel.com, vipin.varghese@intel.com, bruce.richardson@intel.com, Marko Kovacevic Date: Wed, 31 Jan 2018 16:46:46 +0000 Message-Id: <20180131164646.16603-1-marko.kovacevic@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH v1] doc: update definition of lcore id and lcore index X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2018 16:47:09 -0000 Added examples in lcore index for better explanation on various examples, Sited examples for lcore id. Signed-off-by: Marko Kovacevic --- 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. * @return * Logical core ID (in EAL thread) or LCORE_ID_ANY (in non-EAL thread) */ @@ -94,8 +96,19 @@ rte_lcore_count(void) /** * Return the index of the lcore starting from zero. - * The order is physical or given by command line (-l option). * + * For example: + * 1. '-c 0xf0' - CPU core ID 4 is index 0, 5 + * is 1 and so on. + * + * 2. '-l 22-25' - CPU core ID 22 is index 0 + * 23 is 1 and so on. + * + * 3. '-l 22,18' - CPU core ID 22 is index 0 and + * 18 is 1 + * + * 4. '-c 0xcc' - CPU core ID 2 is index 0, 3 is index 1, + * 6 is index 2 and 7 is index 3. * @param lcore_id * The targeted lcore, or -1 for the current one. * @return -- 2.9.5