mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 06:45:17 +00:00
netdev-dpdk: Add mempool reuse/free debug.
There is debug when a new mempool is created, but not when it is reused or freed. Add these as it is very difficult to debug mempool issues from logs without them. Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
committed by
Ian Stokes
parent
c77f6920de
commit
a7fb0a4ee1
@@ -616,6 +616,7 @@ dpdk_mp_sweep(void) OVS_REQUIRES(dpdk_mp_mutex)
|
|||||||
|
|
||||||
LIST_FOR_EACH_SAFE (dmp, next, list_node, &dpdk_mp_list) {
|
LIST_FOR_EACH_SAFE (dmp, next, list_node, &dpdk_mp_list) {
|
||||||
if (!dmp->refcount && dpdk_mp_full(dmp->mp)) {
|
if (!dmp->refcount && dpdk_mp_full(dmp->mp)) {
|
||||||
|
VLOG_DBG("Freeing mempool \"%s\"", dmp->mp->name);
|
||||||
ovs_list_remove(&dmp->list_node);
|
ovs_list_remove(&dmp->list_node);
|
||||||
rte_mempool_free(dmp->mp);
|
rte_mempool_free(dmp->mp);
|
||||||
rte_free(dmp);
|
rte_free(dmp);
|
||||||
@@ -632,6 +633,7 @@ dpdk_mp_get(int socket_id, int mtu)
|
|||||||
ovs_mutex_lock(&dpdk_mp_mutex);
|
ovs_mutex_lock(&dpdk_mp_mutex);
|
||||||
LIST_FOR_EACH (dmp, list_node, &dpdk_mp_list) {
|
LIST_FOR_EACH (dmp, list_node, &dpdk_mp_list) {
|
||||||
if (dmp->socket_id == socket_id && dmp->mtu == mtu) {
|
if (dmp->socket_id == socket_id && dmp->mtu == mtu) {
|
||||||
|
VLOG_DBG("Reusing mempool \"%s\"", dmp->mp->name);
|
||||||
dmp->refcount++;
|
dmp->refcount++;
|
||||||
reuse = true;
|
reuse = true;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user