linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net, virtio_net: replace the magic value
@ 2013-11-18 13:19 Zhi Yong Wu
  2013-11-18 21:23 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Zhi Yong Wu @ 2013-11-18 13:19 UTC (permalink / raw)
  To: netdev; +Cc: mst, rusty, linux-kernel, Zhi Yong Wu

From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

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>
---
 drivers/net/virtio_net.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index cdc7c90..e0cb2d1 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1619,8 +1619,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) {
-- 
1.7.6.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net, virtio_net: replace the magic value
  2013-11-18 13:19 [PATCH] net, virtio_net: replace the magic value Zhi Yong Wu
@ 2013-11-18 21:23 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-11-18 21:23 UTC (permalink / raw)
  To: zwu.kernel; +Cc: netdev, mst, rusty, linux-kernel, wuzhy

From: Zhi Yong Wu <zwu.kernel@gmail.com>
Date: Mon, 18 Nov 2013 21:19:27 +0800

> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> 
> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-18 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 13:19 [PATCH] net, virtio_net: replace the magic value Zhi Yong Wu
2013-11-18 21:23 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).