qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disabl


From: Yuanhan Liu
Subject: Re: [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue.
Date: Wed, 23 Sep 2015 10:05:02 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Sep 22, 2015 at 08:47:04AM -0600, Eric Blake wrote:
> On 09/18/2015 08:58 AM, Yuanhan Liu wrote:
> > From: Changchun Ouyang <address@hidden>
> > 
> > Add a new message, VHOST_USER_SET_VRING_ENABLE, to enable or disable
> > a specific virt queue, which is similar to attach/detach queue for
> > tap device.
> > 
> > virtio driver on guest doesn't have to use max virt queue pair, it
> > could enable any number of virt queue ranging from 1 to max virt
> > queue pair.
> > 
> > Signed-off-by: Changchun Ouyang <address@hidden>
> > Signed-off-by: Yuanhan Liu <address@hidden>
> > ---
> >  docs/specs/vhost-user.txt         | 12 +++++++++++-
> >  hw/net/vhost_net.c                | 18 ++++++++++++++++++
> >  hw/net/virtio-net.c               |  8 ++++++++
> >  hw/virtio/vhost-user.c            | 19 +++++++++++++++++++
> >  include/hw/virtio/vhost-backend.h |  2 ++
> >  include/net/vhost_net.h           |  2 ++
> >  6 files changed, 60 insertions(+), 1 deletion(-)
> > 
> > diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
> > index cfc9d41..a5f1c31 100644
> > --- a/docs/specs/vhost-user.txt
> > +++ b/docs/specs/vhost-user.txt
> > @@ -148,7 +148,9 @@ VHOST_USER_GET_PROTOCOL_FEATURES. Master should stop 
> > when the number of
> >  requested queues is bigger than that.
> >  
> >  As all queues share one connection, the master uses a unique index for each
> > -queue in the sent message to identify a specified queue.
> > +queue in the sent message to identify a specified queue. One queue pairs
> 
> s/pairs/pair/

Thanks.

> 
> > +is enabled initially. More queues are enabled dynamically, by sending
> > +message VHOST_USER_SET_VRING_ENABLE.
> >  
> >  Message types
> >  -------------
> > @@ -327,3 +329,11 @@ Message types
> >        Query how many queues the backend supports. This request should be
> >        sent only when VHOST_USER_PROTOCOL_F_MQ is set in quried protocol
> >        features by VHOST_USER_GET_PROTOCOL_FEATURES.
> > +
> > + * VHOST_USER_SET_VRING_ENABLE
> > +
> > +      Id: 18
> > +      Equivalent ioctl: N/A
> > +      Master payload: vring state description
> > +
> > +      Signal slave to enable or disable corresponding vring.
> 
> Does there need to be any QMP control to manually change a given queue,
> or is it all used under the hood with no need for management apps to
> care other than their initial request of max queues?

TBH, I don't know. As far as I know, there is only one queue pair will
be enabled by default, and it's user's job to enable (or disable) more
queue pairs, say, by ethtool:

    # ethtool -L eth0 combined <queue pair number>

Which ends up sending the VHOST_USER_SET_VRING_ENABLE to actually enable
(or disable) a specific queue pairs.

Does that answer your question?

        --yliu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]