From 8d9e7d0da25cda3dfb596c66aafbb65cf75d2513 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 26 Jun 2013 12:01:46 +0200 Subject: [PATCH] lwip: set some reasonable default rcv buf size lwip reports via getsockopt the size of the default size of the receive buffer to the netperf server. lwip returns 2GB and netperf server uses this value to allocate some buffers - which of course fails with out of memory. Reduces the "default size" to some smaller value. With the commit we are not forced anymore to (but still can) use specific netperf client options regarding memory allocations of the receive buffer. --- libports/include/lwip/lwipopts.h | 2 +- ports/run/netperf.run | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libports/include/lwip/lwipopts.h b/libports/include/lwip/lwipopts.h index 203bdefa2..33b6c922d 100644 --- a/libports/include/lwip/lwipopts.h +++ b/libports/include/lwip/lwipopts.h @@ -62,7 +62,7 @@ #define TCP_SND_BUF (32 * TCP_MSS) #define TCP_SND_QUEUELEN ((32 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) -#define RECV_BUFSIZE_DEFAULT 2147483647 /* this is actually INT_MAX, default value */ +#define RECV_BUFSIZE_DEFAULT 128 * 1024 #define PBUF_POOL_SIZE 96 diff --git a/ports/run/netperf.run b/ports/run/netperf.run index f5678dce4..48ea55163 100644 --- a/ports/run/netperf.run +++ b/ports/run/netperf.run @@ -178,7 +178,7 @@ set packet_size 1024 set netperf_tests "TCP_STREAM TCP_MAERTS" foreach netperf_test $netperf_tests { - spawn bin/netperf_host -H $ip_addr -P 1 -v 2 -t $netperf_test -c -C -- -m $packet_size -S 0,65520 -P 49153,49153 + spawn bin/netperf_host -H $ip_addr -P 1 -v 2 -t $netperf_test -c -C -- -m $packet_size -P 49153,49153 set netperf_id $spawn_id run_genode_until "Segment" 60 $netperf_id