[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1354580527.2819.16.camel@bwh-desktop.uk.solarflarecom.com>
Date: Tue, 4 Dec 2012 00:22:07 +0000
From: Ben Hutchings <bhutchings@...arflare.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
CC: Jason Wang <jasowang@...hat.com>, <rusty@...tcorp.com.au>,
<krkumar2@...ibm.com>, <virtualization@...ts.linux-foundation.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<kvm@...r.kernel.org>, <jwhan@...ewood.snu.ac.kr>,
<shiyer@...hat.com>
Subject: Re: [net-next rfc v7 3/3] virtio-net: change the number of queues
through ethtool
On Mon, 2012-12-03 at 13:25 +0200, Michael S. Tsirkin wrote:
> On Mon, Dec 03, 2012 at 02:09:28PM +0800, Jason Wang wrote:
> > On Sunday, December 02, 2012 06:09:06 PM Michael S. Tsirkin wrote:
> > > On Tue, Nov 27, 2012 at 06:16:00PM +0800, Jason Wang wrote:
> > > > This patch implement the {set|get}_channels method of ethool to allow user
> > > > to change the number of queues dymaically when the device is running.
> > > > This would let the user to configure it on demand.
> > > >
> > > > Signed-off-by: Jason Wang <jasowang@...hat.com>
> > > > ---
> > > >
> > > > drivers/net/virtio_net.c | 41 +++++++++++++++++++++++++++++++++++++++++
> > > > 1 files changed, 41 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> > > > index bcaa6e5..f08ec2a 100644
> > > > --- a/drivers/net/virtio_net.c
> > > > +++ b/drivers/net/virtio_net.c
> > > > @@ -1578,10 +1578,51 @@ static struct virtio_driver virtio_net_driver = {
> > > >
> > > > #endif
> > > > };
> > > >
> > > > +/* TODO: Eliminate OOO packets during switching */
> > > > +static int virtnet_set_channels(struct net_device *dev,
> > > > + struct ethtool_channels *channels)
> > > > +{
> > > > + struct virtnet_info *vi = netdev_priv(dev);
> > > > + u16 queue_pairs = channels->combined_count;
>
> by the way shouldn't this be combined_count / 2?
>
> And below channels->max_combined = vi->max_queue_pairs * 2; ?
[...]
In this ethtool API, 'channel' means an IRQ and set of queues that
trigger it. So each ethtool-channel will correspond to one queue-pair
and not one virtio channel.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists