Patchwork Increased buffer size to 16kb for larger jumbo frames

login
register
mail settings
Submitter Kay Ackermann
Date Nov. 21, 2009, 2:19 p.m.
Message ID <57980600.20091121151910@uni-ulm.de>
Download mbox | patch
Permalink /patch/38983/
State New
Headers show

Comments

Kay Ackermann - Nov. 21, 2009, 2:19 p.m.
Increased buffer size to 16kb for larger jumbo frames

Signed-off-by: Kay Ackermann <Kay.Ackermann@uni-ulm.de>
---
 net.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/net.c b/net.c
index 9ea66e3..1e727c0 100644
--- a/net.c
+++ b/net.c
@@ -618,7 +618,7 @@  ssize_t qemu_send_packet_raw(VLANClientState *vc, const uint8_t *buf, int size)
 static ssize_t vc_sendv_compat(VLANClientState *vc, const struct iovec *iov,
                                int iovcnt)
 {
-    uint8_t buffer[4096];
+    uint8_t buffer[16384];
     size_t offset = 0;
     int i;
 
@@ -1325,7 +1325,7 @@  typedef struct VDEState {
 static void vde_to_qemu(void *opaque)
 {
     VDEState *s = opaque;
-    uint8_t buf[4096];
+    uint8_t buf[16384];
     int size;
 
     size = vde_recv(s->vde, (char *)buf, sizeof(buf), 0);
@@ -1392,7 +1392,7 @@  typedef struct NetSocketState {
     int state; /* 0 = getting length, 1 = getting data */
     unsigned int index;
     unsigned int packet_len;
-    uint8_t buf[4096];
+    uint8_t buf[16384];
     struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */
 } NetSocketState;
 
@@ -1427,7 +1427,7 @@  static void net_socket_send(void *opaque)
     NetSocketState *s = opaque;
     int size, err;
     unsigned l;
-    uint8_t buf1[4096];
+    uint8_t buf1[16384];
     const uint8_t *buf;
 
     size = recv(s->fd, (void *)buf1, sizeof(buf1), 0);