net: tftp: Fix too small block size
PATCH 1/1 net: tftp: Fix too small block size
Commit b618b3707633 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig") accidentally set the default *option* TFTP block size to 512 bytes, even though the comment in the code says that this is a terrible choice. Most boards didn't define the symbol before, so they got the default block size of 1468 bytes before, but now use 512 bytes, which is also the fallback. This leads to both abysmal performance and a lot of hashes printed on the screen (one character for every 5K), which is both annoying and slow over serial links.
Set the default block size in Kconfig back to the value it had before.
This improves TFTP performance from 2.8 MB/s to 6.9 MB/s on a Pine64.
--- net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/Kconfig +1 -1
@@ -31,7 +31,7 @@ config IP_DEFRAG config TFTP_BLOCKSIZE int "TFTP block size" - default 512 + default 1468 help Default TFTP block size.
Signature · 1 line
2.14.5
PATCH 1/1 net: tftp: Fix too small block size
Quoted 10 lines · Andre Przywara
Commit
b618b3707633("net: ConvertCONFIG_TFTP_BLOCKSIZEtoKconfig") accidentally set the default *option* TFTP block size to 512 bytes, even though the comment in the code says that this is a terrible choice. Most boards didn't define the symbol before, so they got the default block size of 1468 bytes before, but now use 512 bytes, which is also the fallback. This leads to both abysmal performance and a lot of hashes printed on the screen (one character for every 5K), which is both annoying and slow over serial links.
Quoted 6 lines
Set the default block size in
Kconfigback to the value it had before.This improves TFTP performance from 2.8 MB/s to 6.9 MB/s on a Pine64.
Fixes b618b3707633 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig")Signed-off-by Andre Przywara <[email protected]>