48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
|
From: Michal Kubecek <mkubecek@suse.cz>
|
||
|
Date: Fri, 27 Sep 2013 19:05:45 +0200
|
||
|
Subject: net: increase tap buffer size
|
||
|
Patch-mainline: v0.12.0-rc0
|
||
|
Git-commit: 8e0f8e5bf8fd483dd28329055336cf895b74c89f (partial)
|
||
|
References: bnc#840196
|
||
|
|
||
|
Increase size of buffere embedded in struct TAPState to allow
|
||
|
jumbo frames longer then 4096 bytes.
|
||
|
|
||
|
Part of upstream qemu commit
|
||
|
|
||
|
8e0f8e5b net: enable IFF_VNET_HDR on tap fds if available
|
||
|
|
||
|
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
||
|
---
|
||
|
tools/qemu-xen-traditional-dir-remote/net.c | 7 ++++++-
|
||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/tools/qemu-xen-traditional-dir-remote/net.c b/tools/qemu-xen-traditional-dir-remote/net.c
|
||
|
index 2ca85a3..502a691 100644
|
||
|
--- a/tools/qemu-xen-traditional-dir-remote/net.c
|
||
|
+++ b/tools/qemu-xen-traditional-dir-remote/net.c
|
||
|
@@ -693,6 +693,11 @@ static void vmchannel_read(void *opaque, const uint8_t *buf, int size)
|
||
|
|
||
|
#if !defined(_WIN32)
|
||
|
|
||
|
+/* Maximum GSO packet size (64k) plus plenty of room for
|
||
|
+ * the ethernet and virtio_net headers
|
||
|
+ */
|
||
|
+#define TAP_BUFSIZE (4096 + 65536)
|
||
|
+
|
||
|
typedef struct TAPState {
|
||
|
VLANClientState *vc;
|
||
|
int fd;
|
||
|
@@ -700,7 +705,7 @@ typedef struct TAPState {
|
||
|
char down_script[1024];
|
||
|
char down_script_arg[128];
|
||
|
char script_arg[1024];
|
||
|
- uint8_t buf[4096];
|
||
|
+ uint8_t buf[TAP_BUFSIZE];
|
||
|
} TAPState;
|
||
|
|
||
|
#ifndef CONFIG_STUBDOM
|
||
|
--
|
||
|
1.8.1.4
|
||
|
|