On Wed, Sep 09, 2015 at 08:05:11AM +0000, Ouyang, Changchun wrote:
> 
> 
> > -----Original Message-----
> > From: Yuanhan Liu [mailto:yuanhan....@linux.intel.com]
> > Sent: Tuesday, September 8, 2015 3:39 PM
> > To: qemu-devel@nongnu.org
> > Cc: m...@redhat.com; Ouyang, Changchun; Yuanhan Liu
> > Subject: [PATCH 6/7] vhost-user: add multiple queue support
> > 
> > From: Ouyang Changchun <changchun.ouy...@intel.com>
> > 
> > This patch is initially based a patch from Nikolay Nikolaev.
> > 
> > Here is the latest version for adding vhost-user multiple queue support, by
> > creating a nc and vhost_net pair for each queue.
> > 
> > 
> >  static int vhost_user_start(VhostUserState *s)  {
> >      VhostNetOptions options;
> > +    VHostNetState *vhost_net;
> > +    int max_queues;
> > +    int i = 0;
> > 
> > -    if (vhost_user_running(s)) {
> > +    if (s->running)
> >          return 0;
> > -    }
> > 
> >      options.backend_type = VHOST_BACKEND_TYPE_USER;
> > -    options.net_backend = &s->nc;
> >      options.opaque = s->chr;
> > 
> > -    s->vhost_net = vhost_net_init(&options);
> > +    options.net_backend = s->peers[i].nc;
> > +    vhost_net = s->peers[i++].vhost_net = vhost_net_init(&options);
> > +
> > +    max_queues = vhost_net_get_max_queues(vhost_net);
> > +    if (s->queues >= max_queues) {
> 
> use '>' rather than '>=' here? 

Right, and thanks!

        --yliu


Reply via email to