mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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:
parent
cf970c002d
commit
0f13b66b01
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user