qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support


From: Ouyang, Changchun
Subject: Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support
Date: Wed, 9 Sep 2015 08:05:11 +0000


> -----Original Message-----
> From: Yuanhan Liu [mailto:address@hidden
> Sent: Tuesday, September 8, 2015 3:39 PM
> To: address@hidden
> Cc: address@hidden; Ouyang, Changchun; Yuanhan Liu
> Subject: [PATCH 6/7] vhost-user: add multiple queue support
> 
> From: Ouyang Changchun <address@hidden>
> 
> 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? 





reply via email to

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