diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2022-08-30 09:38:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-09-12 12:09:20 +0200 |
commit | 320ce55adcb6bc2c426ec98bd7e97bcbd6873ce1 (patch) | |
tree | ce3a1dd0fe067fde63eef235464fb936cd8e61cd /fs/Kconfig | |
parent | b878b167cba028d7ab264d100a6c2c4bf3a460f3 (diff) | |
download | barebox-320ce55adcb6bc2c426ec98bd7e97bcbd6873ce1.tar.gz barebox-320ce55adcb6bc2c426ec98bd7e97bcbd6873ce1.tar.xz |
tftp: implement 'windowsize' (RFC 7440) support
Results (with the reorder patch; numbers in bytes/s) on an iMX8MP are:
| windowsize | VPN | 1 Gb/s | 100 Mb/s |
|------------|-----------|------------|------------|
| 128 | 3.869.284 | 98.643.085 | 11.434.852 |
| 64 | 3.863.581 | 98.550.375 | 11.434.852 |
| 48 | 3.431.580 | 94.211.680 | 11.275.010 |
| 32 | 2.835.129 | 85.250.081 | 10.985.605 |
| 24 | 2.344.858 | 77.787.537 | 10.765.667 |
| 16 | 1.734.186 | 67.519.381 | 10.210.087 |
| 12 | 1.403.340 | 61.972.576 | 9.915.612 |
| 8 | 1.002.462 | 50.852.376 | 9.016.130 |
| 6 | 775.573 | 42.781.558 | 8.422.297 |
| 4 | 547.845 | 32.066.544 | 6.835.567 |
| 3 | 412.987 | 26.526.081 | 6.322.435 |
| 2 | 280.987 | 19.120.641 | 5.494.241 |
| 1 | 141.699 | 10.431.516 | 2.967.224 |
(VPN = OpenVPN on ADSL 50 Mb/s).
The window size can be configured at runtime.
This commit increases barebox size by
| add/remove: 1/0 grow/shrink: 4/1 up/down: 148/-16 (132)
| Function old new delta
| tftp_send 336 384 +48
| tftp_handler 880 928 +48
| tftp_init 16 60 +44
| tftp_allocate_transfer 100 104 +4
| g_tftp_window_size - 4 +4
| tftp_poll 180 164 -16
| Total: Before=629980, After=630112, chg +0.02%
Setting FS_TFTP_MAX_WINDOW_SIZE to zero reduces it to
| add/remove: 1/0 grow/shrink: 3/2 up/down: 96/-52 (44)
| Function old new delta
| tftp_init 16 60 +44
| tftp_handler 880 924 +44
| tftp_allocate_transfer 100 104 +4
| g_tftp_window_size - 4 +4
| tftp_poll 180 164 -16
| tftp_send 336 300 -36
| Total: Before=629980, After=630024, chg +0.01%
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Link: https://lore.barebox.org/20220830073816.2694734-17-enrico.scholz@sigma-chemnitz.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/Kconfig')
-rw-r--r-- | fs/Kconfig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index aeba00073e..0c49342859 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -43,6 +43,20 @@ config FS_TFTP prompt "tftp support" depends on NET +config FS_TFTP_MAX_WINDOW_SIZE + int + prompt "maximum tftp window size (RFC 7440)" + depends on FS_TFTP + default 128 + range 1 128 + help + The maximum allowed tftp "windowsize" (RFC 7440). Higher + value increase speed of the tftp download with the cost of + memory (1432 bytes per slot). + + Requires tftp "windowsize" (RFC 7440) support on server side + to have an effect. + config FS_OMAP4_USBBOOT bool prompt "Filesystem over usb boot" |