From: Zhi Yong Wu <zwu.kernel@gmail.com>
To: netdev@vger.kernel.org
Cc: qemu-devel@nongnu.org, rusty@rustcorp.com.au,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, mst@redhat.com
Subject: [Qemu-devel] [PATCH 4/4] net, virtio_net: replace the magic value
Date: Mon, 18 Nov 2013 16:46:20 +0800 [thread overview]
Message-ID: <1384764380-16832-1-git-send-email-zwu.kernel@gmail.com> (raw)
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>
---
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
next reply other threads:[~2013-11-18 8:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 8:46 Zhi Yong Wu [this message]
2013-11-18 9:50 ` [Qemu-devel] [PATCH 4/4] net, virtio_net: replace the magic value Michael S. Tsirkin
2013-11-18 10:07 ` Zhi Yong Wu
2013-11-18 10:15 ` Michael S. Tsirkin
2013-11-18 12:26 ` Zhi Yong Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384764380-16832-1-git-send-email-zwu.kernel@gmail.com \
--to=zwu.kernel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=wuzhy@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).