Skip to content

Commit

Permalink
net, virtio_net: replace the magic value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhi Yong Wu authored and David S. Miller committed Nov 18, 2013
1 parent cf970c0 commit 0f13b66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0f13b66

Please sign in to comment.