Thread (1 message) 1 message, 1 author, 2014-12-11
DORMANTno replies

[RFC PATCH 3/7] ring: use linear-tid as ring debug stats index

From: Cunming Liang <hidden>
Date: 2014-12-11 02:04:46
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Signed-off-by: Cunming Liang <redacted>
---
 lib/librte_ring/rte_ring.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 3920830..c038a4f 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -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)
-- 
1.8.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help