Function debug_ring is used for displaying the RING of the primary process.
Signed-off-by: Vipin Varghese <vipin.vargh...@intel.com> --- app/proc-info/main.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 0f2045858..f8b28d47f 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1073,7 +1073,34 @@ printf("\t -- OOP_LB_IN_LB_OUT (%c)\n", \ static void debug_ring(char *name) { - printf(" rings Name (%s)", name); + snprintf(bdr_str, 100, "debug - RING %"PRIu64, rte_get_tsc_hz()); + STATS_BDR_STR(10, bdr_str); + + if (name != NULL) { + struct rte_ring *ptr = rte_ring_lookup(name); + if (ptr != NULL) { + printf(" - Name (%s) Socket (%d) flags (0x%x)\n", + ptr->name, + ptr->memzone->socket_id, + ptr->flags); + printf(" - size (%u) mask (0x%x) capacity (%u)\n", + ptr->size, + ptr->mask, + ptr->capacity); + printf(" - count (%u) free count (%u)\n", + rte_ring_count(ptr), + rte_ring_free_count(ptr)); + printf(" - full (%d) empty (%d)\n", + rte_ring_full(ptr), + rte_ring_empty(ptr)); + + STATS_BDR_STR(50, ""); + return; + } + } + + rte_ring_list_dump(stdout); + STATS_BDR_STR(50, ""); } static void -- 2.17.1