summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2022-08-30 09:38:16 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-13 13:05:09 +0200
commit84c2f0cd45a6dff23845a6cf2a5a6798d792eec7 (patch)
tree47c825d0d1648c1d644deba904cf6d86652ab2e5 /Documentation
parenta21b7ddc5a90868eda665c69004c43b37beea6ca (diff)
downloadbarebox-84c2f0cd45a6dff23845a6cf2a5a6798d792eec7.tar.gz
barebox-84c2f0cd45a6dff23845a6cf2a5a6798d792eec7.tar.xz
tftp: add some documentation about windowsize support
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Link: https://lore.barebox.org/20220830073816.2694734-22-enrico.scholz@sigma-chemnitz.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/tftp.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/Documentation/filesystems/tftp.rst b/Documentation/filesystems/tftp.rst
index a292765e25..e88ad3dd4c 100644
--- a/Documentation/filesystems/tftp.rst
+++ b/Documentation/filesystems/tftp.rst
@@ -20,3 +20,43 @@ Example:
In addition to the TFTP filesystem implementation, barebox does also have a
:ref:`tftp command <command_tftp>`.
+
+RFC 7440 "windowsize" support
+=============================
+
+barebox supports the tftp windowsize option for downloading files. It
+is not implemented for uploads.
+
+Generally, this option greatly improves the download speed (factors
+4-30 are not uncommon). But choosing a too large windowsize can have
+the opposite effect. Performance depends on:
+
+ - the network infrastructure: when the tftp server sends files with
+ 1Gb/s but there are components in the network (switches or the
+ target nic) which support only 100 Mb/s, packets will be dropped.
+
+ The lower the internal buffers of the bottleneck components, the
+ lower the optimal window size.
+
+ In practice (iMX8MP on a Netgear GS108Ev3 with a port configured to
+ 100 Mb/s) it had to be reduced to
+
+ .. code-block:: console
+
+ global tftp.windowsize=26
+
+ for example.
+
+ - the target network driver: datagrams from server will arive faster
+ than they can be processed and must be buffered internally. For
+ example, the `fec-imx` driver reserves place for
+
+ .. code-block:: c
+
+ #define FEC_RBD_NUM 64
+
+ packets before they are dropped
+
+ - partially the workload: copying downloaded files to ram will be
+ faster than burning them into flash. Latter can consume internal
+ buffers quicker so that windowsize might be reduced