kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Fan Du <fan.du@intel.com>, Will Deacon <Will.Deacon@arm.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Marc Zyngier <Marc.Zyngier@arm.com>
Subject: Re: [PATCHv3 2/2] kvmtool: Restrict virtio queue number to 1 when vhost on
Date: Tue, 21 Jul 2015 10:44:50 +0100	[thread overview]
Message-ID: <55AE1492.1090807@arm.com> (raw)
In-Reply-To: <1437459483-24535-3-git-send-email-fan.du@intel.com>

Hi,

On 21/07/15 07:18, Fan Du wrote:
> vhost kernel driver does not support mutiple queue yet,
> Tweak queue number will fail with "--net mode=tap,vhost=1,mq=2"
> as below when lkvm trying to set ring kick fd for queue 2:
> 
> VHOST_SET_VRING_KICK failed: No buffer space available
> 
> Error on this scenario, and overide with the default one queue
> configuration.

I don't like the idea of overriding an explicitly given command line
parameter (mq=2).
So why do you provide mq=2 in the first place if you know that the
kernel does not support it?
I'd rather see the error message to be more descriptive in that case.
That would help the user to understand what's going on, also it would
still work should the kernel ever support multiple queues in the future.

Cheers,
Andre.

> 
> Signed-off-by: Fan Du <fan.du@intel.com>
> ---
>  virtio/net.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/virtio/net.c b/virtio/net.c
> index d343615..21a80f3 100644
> --- a/virtio/net.c
> +++ b/virtio/net.c
> @@ -730,6 +730,10 @@ static int set_net_param(struct kvm *kvm, struct virtio_net_params *p,
>  		p->mq = atoi(val);
>  	} else
>  		die("Unknown network parameter %s", param);
> +	if (p->vhost && p->mq > 1) {
> +		p->mq = 1;
> +		pr_err("vhost does not support mq yet, overide mq to 1.");
> +	}
>  
>  	return 0;
>  }
> 

  reply	other threads:[~2015-07-21  9:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21  6:18 [PATCHv3 0/2] Fixes for kvmtool virtio-net part Fan Du
2015-07-21  6:18 ` [PATCHv3 1/2] kvmtool: Introduce downscript option for virtio-net Fan Du
2015-07-21  9:44   ` Andre Przywara
2015-07-24 14:23     ` Will Deacon
2015-08-05 10:53     ` [PATCHv4 kvmtool] " Fan Du
2015-07-21  6:18 ` [PATCHv3 2/2] kvmtool: Restrict virtio queue number to 1 when vhost on Fan Du
2015-07-21  9:44   ` Andre Przywara [this message]
2015-08-05  3:05     ` Du, Fan

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=55AE1492.1090807@arm.com \
    --to=andre.przywara@arm.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=fan.du@intel.com \
    --cc=kvm@vger.kernel.org \
    /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).