mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
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 <aconole@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Wan Junjie <wanjunjie@bytedance.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
7ed60839d0
commit
9016592ca0
@@ -3865,6 +3865,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);
|
||||
|
Reference in New Issue
Block a user