lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398093061-13444-1-git-send-email-akong@redhat.com>
Date:	Mon, 21 Apr 2014 23:11:01 +0800
From:	Amos Kong <akong@...hat.com>
To:	virtualization@...ts.linux-foundation.org
Cc:	netdev@...r.kernel.org, mst@...hat.com, jasowang@...hat.com
Subject: [PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support

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@...hat.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));
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ