From: Eli Britstein <[email protected]>

New appctl 'dpdk/get-memzone-stats' implemented to get result of
'rte_memzone_dump()' function.

Could be used for debugging.

Signed-off-by: Eli Britstein <[email protected]>
Acked-by: Roi Dayan <[email protected]>
---
 lib/dpdk.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/dpdk.c b/lib/dpdk.c
index aaf0b2ed8046..b585327ea971 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -324,6 +324,12 @@ malloc_dump_mempool_stats_wrapper(FILE *stream)
     rte_mempool_walk(dump_mempool_stats, stream);
 }
 
+static void
+malloc_dump_memzone_stats_wrapper(FILE *stream)
+{
+    rte_memzone_dump(stream);
+}
+
 static bool
 dpdk_init__(const struct smap *ovs_other_config)
 {
@@ -454,6 +460,9 @@ dpdk_init__(const struct smap *ovs_other_config)
     unixctl_command_register("dpdk/get-mempool-stats", "", 0, 0,
                              dpdk_unixctl_mem_stream,
                              malloc_dump_mempool_stats_wrapper);
+    unixctl_command_register("dpdk/get-memzone-stats", "", 0, 0,
+                             dpdk_unixctl_mem_stream,
+                             malloc_dump_memzone_stats_wrapper);
 
     /* We are called from the main thread here */
     RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;
-- 
2.47.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to