Commit 0f13b66b authored by Zhi Yong Wu's avatar Zhi Yong Wu Committed by David S. Miller

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: default avatarZhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cf970c00
...@@ -1606,8 +1606,8 @@ static int virtnet_probe(struct virtio_device *vdev) ...@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment