qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Pankaj Gupta <pagupta@redhat.com>, qemu-devel@nongnu.org
Cc: aliguori@amazon.com, stefanha@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support
Date: Mon, 08 Jun 2015 14:06:13 +0800	[thread overview]
Message-ID: <557530D5.2050807@redhat.com> (raw)
In-Reply-To: <1433514749-19584-1-git-send-email-pagupta@redhat.com>



On 06/05/2015 10:32 PM, Pankaj Gupta wrote:
>     We use vhostforce to enable vhost even if Guests don't have MSI-X support
> and we fall back to QEMU virtio-net. This patch will enable vhost unconditionally 
> whenever we have vhostforce='ON' or vhost='ON'. 
>
> Initially, I wanted to remove vhostforce completely as an additional argument. 
> But after discussing this in mailing list found that some programs are using vhostforce
> and some vhost. So, we want to keep semantics of both the options.
>
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> ---
>  net/tap.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/tap.c b/net/tap.c
> index d1ca314..4618359 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -649,13 +649,13 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
>          }
>      }
>  
> -    if (tap->has_vhost ? tap->vhost :
> -        vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
> +    if ((tap->has_vhost ? tap->vhost :
> +        vhostfdname) || tap->vhostforce) {
>          VhostNetOptions options;
>  
>          options.backend_type = VHOST_BACKEND_TYPE_KERNEL;
>          options.net_backend = &s->nc;
> -        options.force = tap->has_vhostforce && tap->vhostforce;
> +        options.force = true;
>  
>          if (tap->has_vhostfd || tap->has_vhostfds) {
>              vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);

In this case, I believe there's no need to have vhost_net_query() and
query_guest_notifiers() callbacks (and maybe more others).

  reply	other threads:[~2015-06-08  6:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 14:32 [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support Pankaj Gupta
2015-06-08  6:06 ` Jason Wang [this message]
2015-06-11 11:49   ` Pankaj Gupta
2015-06-12  8:09     ` Jason Wang
2015-06-12  9:22       ` Pankaj Gupta

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=557530D5.2050807@redhat.com \
    --to=jasowang@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=mst@redhat.com \
    --cc=pagupta@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).