netdev-dpdk: Make get_config() report correct queue info.
authorAlex Wang <alexw@nicira.com>
Mon, 15 Sep 2014 20:01:12 +0000 (13:01 -0700)
committerAlex Wang <alexw@nicira.com>
Mon, 15 Sep 2014 21:35:41 +0000 (14:35 -0700)
With the separation of tx queue and rx queue configuration
in netdev-dpdk module, the netdev_dpdk_get_config() can no
longer report 'n_rxq' as tx queue configuration.

This commit fixes the above issue.

Reported-by: Daniele Di Proietto <ddiproietto@vmware.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
lib/netdev-dpdk.c

index 0a6a398..e66eb6e 100644 (file)
@@ -593,9 +593,8 @@ netdev_dpdk_get_config(const struct netdev *netdev_, struct smap *args)
 
     ovs_mutex_lock(&dev->mutex);
 
-    /* XXX: Allow to configure number of queues. */
-    smap_add_format(args, "configured_rx_queues", "%u", netdev_->n_rxq);
-    smap_add_format(args, "configured_tx_queues", "%u", netdev_->n_rxq);
+    smap_add_format(args, "configured_rx_queues", "%d", netdev_->n_rxq);
+    smap_add_format(args, "configured_tx_queues", "%d", netdev_->n_txq);
     ovs_mutex_unlock(&dev->mutex);
 
     return 0;