[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/37] tap: forbid creating multiqueue tap when hub
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 04/37] tap: forbid creating multiqueue tap when hub is used |
Date: |
Tue, 2 Apr 2013 16:45:09 -0500 |
From: Jason Wang <address@hidden>
Obviously, hub does not support multiqueue tap. So this patch forbids creating
multiple queue tap when hub is used to prevent the crash when command line such
as "-net tap,queues=2" is used.
Cc: address@hidden
Signed-off-by: Jason Wang <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit ce675a7579fea498397c5d2da3c5367671e9f02a)
Signed-off-by: Michael Roth <address@hidden>
---
net/tap.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/tap.c b/net/tap.c
index 48c254e..daab350 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -693,6 +693,13 @@ int net_init_tap(const NetClientOptions *opts, const char
*name,
queues = tap->has_queues ? tap->queues : 1;
vhostfdname = tap->has_vhostfd ? tap->vhostfd : NULL;
+ /* QEMU vlans does not support multiqueue tap, in this case peer is set.
+ * For -netdev, peer is always NULL. */
+ if (peer && (tap->has_queues || tap->has_fds || tap->has_vhostfds)) {
+ error_report("Multiqueue tap cannnot be used with QEMU vlans");
+ return -1;
+ }
+
if (tap->has_fd) {
if (tap->has_ifname || tap->has_script || tap->has_downscript ||
tap->has_vnet_hdr || tap->has_helper || tap->has_queues ||
--
1.7.9.5
- [Qemu-devel] Patch Round-up for stable 1.4.1, freeze next Tuesday, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 01/37] target-ppc: Fix "G2leGP3" PVR, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 02/37] coroutine: trim down nesting level in perf_nesting test, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 03/37] block: complete all IOs before .bdrv_truncate, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 04/37] tap: forbid creating multiqueue tap when hub is used,
Michael Roth <=
- [Qemu-devel] [PATCH 05/37] qemu-char.c: fix waiting for telnet connection message, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 06/37] net: reduce the unnecessary memory allocation of multiqueue, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 08/37] vga: fix byteswapping., Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 09/37] qmp: netdev_add is like -netdev, not -net, fix documentation, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 07/37] help: add docs for multiqueue tap options, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 10/37] qemu-ga: make guest-sync-delimited available during fsfreeze, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 11/37] scsi-disk: handle io_canceled uniformly and correctly, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 12/37] iscsi: look for pkg-config file too, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 13/37] scsi: do not call scsi_read_data/scsi_write_data for a canceled request, Michael Roth, 2013/04/02
- [Qemu-devel] [PATCH 14/37] scsi-disk: do not complete canceled UNMAP requests, Michael Roth, 2013/04/02