[dpdk-dev,RFC,3/7] ring: use linear-tid as ring debug stats index
Commit Message
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
---
lib/librte_ring/rte_ring.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -189,9 +189,9 @@ struct rte_ring {
*/
#ifdef RTE_LIBRTE_RING_DEBUG
#define __RING_STAT_ADD(r, name, n) do { \
- unsigned __lcore_id = rte_lcore_id(); \
- r->stats[__lcore_id].name##_objs += n; \
- r->stats[__lcore_id].name##_bulk += 1; \
+ unsigned __thread_id = rte_linear_thread_id(); \
+ r->stats[__thread_id].name##_objs += n; \
+ r->stats[__thread_id].name##_bulk += 1; \
} while(0)
#else
#define __RING_STAT_ADD(r, name, n) do {} while(0)