]> git.proxmox.com Git - ovs.git/commitdiff
netdev-dpdk: Add mempool reuse/free debug.
authorKevin Traynor <ktraynor@redhat.com>
Fri, 13 Apr 2018 17:25:09 +0000 (18:25 +0100)
committerIan Stokes <ian.stokes@intel.com>
Sat, 21 Apr 2018 16:09:34 +0000 (17:09 +0100)
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>
lib/netdev-dpdk.c

index c9eec1b7dc41199f0fc13e48e90c488eff348eb1..476feba285a5d2c44c2e6af755d251cbd4c564f1 100644 (file)
@@ -616,6 +616,7 @@ dpdk_mp_sweep(void) OVS_REQUIRES(dpdk_mp_mutex)
 
     LIST_FOR_EACH_SAFE (dmp, next, list_node, &dpdk_mp_list) {
         if (!dmp->refcount && dpdk_mp_full(dmp->mp)) {
+            VLOG_DBG("Freeing mempool \"%s\"", dmp->mp->name);
             ovs_list_remove(&dmp->list_node);
             rte_mempool_free(dmp->mp);
             rte_free(dmp);
@@ -632,6 +633,7 @@ dpdk_mp_get(int socket_id, int mtu)
     ovs_mutex_lock(&dpdk_mp_mutex);
     LIST_FOR_EACH (dmp, list_node, &dpdk_mp_list) {
         if (dmp->socket_id == socket_id && dmp->mtu == mtu) {
+            VLOG_DBG("Reusing mempool \"%s\"", dmp->mp->name);
             dmp->refcount++;
             reuse = true;
             break;