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>
This commit is contained in:
Zhi Yong Wu 2013-11-18 21:19:27 +08:00 committed by David S. Miller
parent cf970c002d
commit 0f13b66b01

View File

@ -1606,8 +1606,8 @@ static int virtnet_probe(struct virtio_device *vdev)
if (err) if (err)
goto free_stats; goto free_stats;
netif_set_real_num_tx_queues(dev, 1); netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs);
netif_set_real_num_rx_queues(dev, 1); netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs);
err = register_netdev(dev); err = register_netdev(dev);
if (err) { if (err) {