netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Amos Kong <akong@redhat.com>, virtualization@lists.linux-foundation.org
Cc: netdev@vger.kernel.org, mst@redhat.com
Subject: Re: [PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
Date: Tue, 22 Apr 2014 11:11:50 +0800	[thread overview]
Message-ID: <5355DDF6.7050509@redhat.com> (raw)
In-Reply-To: <1398093061-13444-1-git-send-email-akong@redhat.com>

On 04/21/2014 11:11 PM, Amos Kong wrote:
> Currently ethtool returns zero if there is no virtqueue or MQ isn't
> support, we should return -ENOTSUPP to notice user.
>
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  drivers/net/virtio_net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 8a852b5..eaf8266 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs)
>  	struct net_device *dev = vi->dev;
>  
>  	if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ))
> -		return 0;
> +		return -ENOTSUPP;
>  
>  	s.virtqueue_pairs = queue_pairs;
>  	sg_init_one(&sg, &s, sizeof(s));

How about check the return value of virtnet_set_queues() in
virtnet_restore() also?

  reply	other threads:[~2014-04-22  3:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 15:11 [PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support Amos Kong
2014-04-22  3:11 ` Jason Wang [this message]
2014-04-22  3:23   ` Amos Kong
2014-04-22  3:53     ` Jason Wang
2014-04-22  4:14       ` Amos Kong

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=5355DDF6.7050509@redhat.com \
    --to=jasowang@redhat.com \
    --cc=akong@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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).