Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Dumazet and committed by
David S. Miller
0cf833ae 2a6c8c79

+1 -1
+1 -1
drivers/net/loopback.c
··· 157 157 */ 158 158 static void loopback_setup(struct net_device *dev) 159 159 { 160 - dev->mtu = (16 * 1024) + 20 + 20 + 12; 160 + dev->mtu = 64 * 1024; 161 161 dev->hard_header_len = ETH_HLEN; /* 14 */ 162 162 dev->addr_len = ETH_ALEN; /* 6 */ 163 163 dev->tx_queue_len = 0;