diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2013-11-18 08:19:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-18 16:23:09 -0500 |
commit | 0f13b66b01c6e2ec4913a7812414183844d1cc4f (patch) | |
tree | 29a03c25a18b831472e2e55a95069d6a6c74da4b | |
parent | cf970c002d270c36202bd5b9c2804d3097a52da0 (diff) |
net, virtio_net: replace the magic value
It is more appropriate to use # of queue pairs currently used by
the driver instead of a magic value.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/virtio_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 69fb225e59a6..69ad42ba1538 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -1606,8 +1606,8 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
1606 | if (err) | 1606 | if (err) |
1607 | goto free_stats; | 1607 | goto free_stats; |
1608 | 1608 | ||
1609 | netif_set_real_num_tx_queues(dev, 1); | 1609 | netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs); |
1610 | netif_set_real_num_rx_queues(dev, 1); | 1610 | netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs); |
1611 | 1611 | ||
1612 | err = register_netdev(dev); | 1612 | err = register_netdev(dev); |
1613 | if (err) { | 1613 | if (err) { |