summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2019-03-05 19:28:26 +0300
committerIan Stokes <ian.stokes@intel.com>2019-03-22 22:45:28 +0000
commit4be793c13abe6c04ab251f0cc57a051be9edaf13 (patch)
tree03b1a02b384e1792601729ceca1592b3443850f3
parent8371107cd2c3a675b10dbe0926b7e9c9ac3b28df (diff)
downloadopenvswitch-4be793c13abe6c04ab251f0cc57a051be9edaf13.tar.gz
netdev-dpdk: Print netdev name for txq mapping.
In case of reconfiguration while 'vhost_id' is not set yet, there will be the meaningless message like: |netdev_dpdk|DBG|TX queue mapping for |netdev_dpdk|DBG| 0 --> 0 It's better to print the name of the netdev which is always set. Additionally fixed possible splitting by other log messages and missing space in the queue state message. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
-rw-r--r--lib/netdev-dpdk.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index f391643fe..3b552c980 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -3287,9 +3287,17 @@ netdev_dpdk_remap_txqs(struct netdev_dpdk *dev)
}
}
- VLOG_DBG("TX queue mapping for %s\n", dev->vhost_id);
- for (i = 0; i < total_txqs; i++) {
- VLOG_DBG("%2d --> %2d", i, dev->tx_q[i].map);
+ if (VLOG_IS_DBG_ENABLED()) {
+ struct ds mapping = DS_EMPTY_INITIALIZER;
+
+ ds_put_format(&mapping, "TX queue mapping for port '%s':\n",
+ netdev_get_name(&dev->up));
+ for (i = 0; i < total_txqs; i++) {
+ ds_put_format(&mapping, "%2d --> %2d\n", i, dev->tx_q[i].map);
+ }
+
+ VLOG_DBG("%s", ds_cstr(&mapping));
+ ds_destroy(&mapping);
}
free(enabled_queues);
@@ -3457,7 +3465,7 @@ vring_state_changed(int vid, uint16_t queue_id, int enable)
ovs_mutex_unlock(&dpdk_mutex);
if (exists) {
- VLOG_INFO("State of queue %d ( tx_qid %d ) of vhost device '%s'"
+ VLOG_INFO("State of queue %d ( tx_qid %d ) of vhost device '%s' "
"changed to \'%s\'", queue_id, qid, ifname,
(enable == 1) ? "enabled" : "disabled");
} else {