eal: get relative core index
authorPatrick Lu <Patrick.Lu@intel.com>
Wed, 11 Jun 2014 20:45:09 +0000 (13:45 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 25 Nov 2014 12:33:35 +0000 (13:33 +0100)
commit5583037a795076f74f767d55a00c652f5b8f1382
treef157ce6dbd89a2e1245598a0c5c0323bd9578aaf
parentd888cb8b9613c5f72015830d143150ed90207a71
eal: get relative core index

EAL -c option allows the user to enable any lcore in the system.
Often times, the user app wants to know 1st enabled core, 2nd
enabled core, etc, rather than phyical core ID (rte_lcore_id().)

The new API rte_lcore_index() will return an index from enabled lcores
starting from zero.

Signed-off-by: Patrick Lu <patrick.lu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/common/eal_common_options.c
lib/librte_eal/common/include/rte_lcore.h