Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1606,8 +1606,8 @@ static int virtnet_probe(struct virtio_device *vdev)
	if (err)
		goto free_stats;

	netif_set_real_num_tx_queues(dev, 1);
	netif_set_real_num_rx_queues(dev, 1);
	netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs);
	netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs);

	err = register_netdev(dev);
	if (err) {