summaryrefslogtreecommitdiffstats
path: root/drivers/net/loopback.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-09-23 22:28:59 +0000
committerDavid S. Miller <davem@davemloft.net>2012-09-24 16:23:53 -0400
commit0cf833aefaa85bbfce3ff70485e5534e09254773 (patch)
tree5dc45fe287ae2b12c722c207b259725d1f49f8b8 /drivers/net/loopback.c
parent2a6c8c7998f95b140f3d3c7ac5dce2fbd6d403e3 (diff)
downloadlinux-0cf833aefaa85bbfce3ff70485e5534e09254773.tar.gz
linux-0cf833aefaa85bbfce3ff70485e5534e09254773.tar.bz2
linux-0cf833aefaa85bbfce3ff70485e5534e09254773.zip
net: loopback: set default mtu to 64K
loopback current mtu of 16436 bytes allows no more than 3 MSS TCP segments per frame, or 48 Kbytes. Changing mtu to 64K allows TCP stack to build large frames and significantly reduces stack overhead. Performance boost on bulk TCP transferts can be up to 30 %, partly because we now have one ACK message for two 64KB segments, and a lower probability of hitting /proc/sys/net/ipv4/tcp_reordering default limit. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r--drivers/net/loopback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 4a075babe193..81f8f9e31db5 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -157,7 +157,7 @@ static const struct net_device_ops loopback_ops = {
*/
static void loopback_setup(struct net_device *dev)
{
- dev->mtu = (16 * 1024) + 20 + 20 + 12;
+ dev->mtu = 64 * 1024;
dev->hard_header_len = ETH_HLEN; /* 14 */
dev->addr_len = ETH_ALEN; /* 6 */
dev->tx_queue_len = 0;