net: tftp: Add client support for RFC 7440
PATCH 1/1 net: tftp: Add client support for RFC 7440
Add support for RFC 7440: "TFTP Windowsize Option".
This optional feature allows the client and server to negotiate a window size of consecutive blocks to send as an alternative for replacing the single-block lockstep schema.
windowsize can be defined statically during compilation by setting CONFIG_TFTP_WINDOWSIZE, or defined in runtime by setting an environment variable: "tftpwindowsize" If not defined, the windowsize is set to 1, meaning that it behaves as it was never defined.
Choosing the appropriate windowsize depends on the specific network topology, underlying NIC.
You should test various windowsize scenarios and see which best work for you.
Setting a windowsize too big can actually decreases performance.
--- README | 5 +++++ net/tftp.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 59 insertions(+), 5 deletions(-)
README +5 -0
@@ -3522,6 +3522,11 @@ List of environment variables (most likely not complete): downloads succeed with high packet loss rates, or with unreliable TFTP servers or client hardware. + tftpwindowsize - if this is set, the value is used for TFTP's + window size as described by RFC 7440. + This means that count of blocks we can receive before + sending ack to server. + vlan - When set to a value < 4095 the traffic over Ethernet is encapsulated/received over 802.1q VLAN tagged frames.
net/tftp.c +54 -5
121 lines not on this page · raw message
Signature · 1 line
2.26.2
PATCH 1/1 net: tftp: Add client support for RFC 7440
Quoted 12 lines · Ramon Fried
Add support for RFC 7440: "TFTP Windowsize Option".
This optional feature allows the client and server to negotiate a window size of consecutive blocks to send as an alternative for replacing the single-block lockstep schema.
windowsize can be defined statically during compilation by setting
CONFIG_TFTP_WINDOWSIZE, or defined in runtime by setting an environment variable: "tftpwindowsize" If not defined, the windowsize is set to 1, meaning that it behaves as it was never defined.
Quoted 8 lines
Choosing the appropriate windowsize depends on the specific network topology, underlying NIC.
You should test various windowsize scenarios and see which best work for you.Setting a windowsize too big can actually decreases performance.
Signed-off-by Ramon Fried <[email protected]>