net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE
PATCH 1/2 net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE
Add help message for the CONFIG_TFTP_BLOCKSIZE default value, as explain in tftp.c before migration in commit b618b3707633 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig")
---
net/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
net/Kconfig +4 -0
@@ -44,5 +44,9 @@ config TFTP_BLOCKSIZE default 1468 help Default TFTP block size. + The MTU is typically 1500 for ethernet, so a TFTP block of + 1468 (MTU minus eth.hdrs) provides a good throughput with + almost-MTU block sizes. + You can also activate CONFIG_IP_DEFRAG to set a larger block. endif # if NET
Signature · 1 line
2.17.1
PATCH 2/2 net: tftp: remove TFTP_MTU_BLOCKSIZE
Remove the unneeded define TFTP_MTU_BLOCKSIZE.
Since the KConfig migration done by commit b618b3707633 ("net:
Convert CONFIG_TFTP_BLOCKSIZE to Kconfig"), CONFIG_TFTP_BLOCKSIZE is always defined and can be used directly to avoid confusion (fallback to 1468 in code is never used).
---
net/tftp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
net/tftp.c +1 -6
@@ -133,14 +133,9 @@ static char tftp_filename[MAX_LEN];* almost-MTU block sizes. At least try... fall back to 512 if need be. * (but those using CONFIG_IP_DEFRAG may want to set a larger block in cfg file) */ -#ifdef CONFIG_TFTP_BLOCKSIZE -#define TFTP_MTU_BLOCKSIZE CONFIG_TFTP_BLOCKSIZE -#else -#define TFTP_MTU_BLOCKSIZE 1468 -#endif static unsigned short tftp_block_size =TFTP_BLOCK_SIZE ; -static unsigned short tftp_block_size_option =TFTP_MTU_BLOCKSIZE ; +static unsigned short tftp_block_size_option =CONFIG_TFTP_BLOCKSIZE ;static inline int store_block (int block,uchar *src,unsigned int len) {
Signature · 1 line
2.17.1
PATCH 2/2 net: tftp: remove TFTP_MTU_BLOCKSIZE
Quoted 7 lines · Patrick Delaunay
Remove the unneeded define
TFTP_MTU_BLOCKSIZE.
Since the KConfig migration done by commitb618b3707633("net:
ConvertCONFIG_TFTP_BLOCKSIZEtoKconfig"),CONFIG_TFTP_BLOCKSIZEis always defined and can be used directly to avoid confusion (fallback to 1468 in code is never used).Signed-off-by Patrick Delaunay <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200428/940573a3/attachment.sig>
PATCH 1/2 net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE
In reply to Patrick DelaunayQuoted 5 lines · Patrick Delaunay
Add help message for the
CONFIG_TFTP_BLOCKSIZEdefault value, as explain intftp.cbefore migration in commitb618b3707633("net: ConvertCONFIG_TFTP_BLOCKSIZEtoKconfig")Signed-off-by Patrick Delaunay <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200428/4c11c900/attachment.sig>