On 25/01/2022 09:41, Wan Junjie wrote:
The ```rte_mempool_avail_count``` and ```rte_mempool_in_use_count```
can tell us the usage of the mempool. It could be helpful for debug
on any memleak in the mempool.
Add a line in the cmd's output.
- Count: avail (118988), in use (12084)
Hi Wan Junjie, Not important, but just fyi, for consistency with other
commit messages and to match the v2 output, the commit message could be
like below. If you agree, then probably the maintainers can update it
when applying.
Either way, thanks for the improvement.
Acked-by: Kevin Traynor <[email protected]>
--
netdev-dpdk: Add mempool count in cmd get-mempool-info.
The rte_mempool_avail_count() and rte_mempool_in_use_count() DPDK API
can tell us the usage of the mempool. It could be helpful for debug
on any memleak in the mempool.
Add a line in the cmd's output:
count: avail (118988), in use (12084)
Acked-by: Aaron Conole <[email protected]>
Signed-off-by: Wan Junjie <[email protected]>
---
v2: remove prefix '-' from output
---
lib/netdev-dpdk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index b6b29c75e..334e348fc 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -3864,6 +3864,9 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn,
ovs_mutex_lock(&dpdk_mp_mutex);
rte_mempool_dump(stream, dev->dpdk_mp->mp);
+ fprintf(stream, " count: avail (%u), in use (%u)\n",
+ rte_mempool_avail_count(dev->dpdk_mp->mp),
+ rte_mempool_in_use_count(dev->dpdk_mp->mp));
ovs_mutex_unlock(&dpdk_mp_mutex);
ovs_mutex_unlock(&dev->mutex);
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev