Skip to contentSkip to conversation

net: tftp: Add client support for RFC 7440

PATCH Superseded Ramon Fried 4 participants 11 messages Jul 18, 2020 – Feb 17, 2021 Networking

lore
Share & tools
lore
#0 lore raw

PATCH v5 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.

---
v2:
* Don't send windowsize option on tftpput, as it's not implemented yet.
* Don't send NACK for every out of order block that arrives, one nack is enough.
v3:
* Add option CONFIG_TFTP_WINDOWSIZE to kconfig with default 1.
* Fixed some spelling errors.
* Took assignment out of a loop.
* simplified variable increment.
v4:
* send ack for last packet, so the server can finish
the tranfer gracefully and not in timeout.
v5:
* rebase the patch on top of latest tftp changes.
* Fix wraparound issue in tftp_cur_block increment.
* Change strcmp to strcasecmp

 README      |  5 ++++
 net/Kconfig |  9 ++++++
 net/tftp.c  | 79 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 86 insertions(+), 7 deletions(-)
README +5 -0
index 2384966a39..2ebf664848 100644
@@ -3473,6 +3473,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 the 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/Kconfig +9 -0
index ac6d0cf8a6..7916ae305f 100644
@@ -49,4 +49,13 @@ config TFTP_BLOCKSIZE
 	  almost-MTU block sizes.
 	  You can also activate CONFIG_IP_DEFRAG to set a larger block.
 
+config TFTP_WINDOWSIZE
+	int "TFTP window size"
+	default 1
+	help
+	  Default TFTP window size.
+	  RFC7440 defines an optional window size of transmits,
+	  before an ack response is required.
+	  The default TFTP implementation implies a window size of 1.
+
 endif   # if NET
net/tftp.c +72 -7

144 lines not on this page · raw message

Signature · 1 line
2.27.0
#1 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 17 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.

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.

Quoted 4 lines

Setting a windowsize too big can actually decreases performance.

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/20200805/ddaa328b/attachment.sig>
#2 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

Regards,
Suneel

Quoted 22 lines · Tom Rini
Quoted 19 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.

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.

Quoted 7 lines
Quoted 2 lines

Applied to u-boot/master, thanks!

--
Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp-1.pcapng
Type: application/x-pcapng
Size: 17324 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210130/7e4d3fc3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp-tftpput-1.pcapng
Type: application/x-pcapng
Size: 17248 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210130/7e4d3fc3/attachment-0001.bin>

#3 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 54 lines · Suneel Garapati

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Quoted 7 lines

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

Regards,
Suneel

Thanks for spotting this, I'll check it out.

#4 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 52 lines · Ramon Fried
Quoted 50 lines · Suneel Garapati

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300
Quoted 8 lines
Quoted 8 lines

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

RFC7440 is not supported by most TFTP Servers, when adding support for this feature I didn't even consider TFTPPUT.
I think that the best thing to do is to only support RFC7440 on TFTPGET. In this case we should remove the tftp_send() when sending a file. I will create a fix, would you mind testing to see if it works for you ? Thanks,
Ramon.

Quoted 4 lines
Quoted 3 lines

Regards,
Suneel

Thanks for spotting this, I'll check it out.

#5 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 62 lines · Ramon Fried
Quoted 52 lines · Ramon Fried
Quoted 50 lines · Suneel Garapati

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300
Quoted 8 lines
Quoted 8 lines

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

Quoted 7 lines

RFC7440 is not supported by most TFTP Servers, when adding support for this feature I didn't even consider TFTPPUT.
I think that the best thing to do is to only support RFC7440 on TFTPGET. In this case we should remove the tftp_send() when sending a file. I will create a fix, would you mind testing to see if it works for you ? Thanks,
Ramon.

Yes, I can test the fix.

Thanks,
Suneel

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Regards,
Suneel

Thanks for spotting this, I'll check it out.

#6 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 71 lines · Suneel Garapati
Quoted 62 lines · Ramon Fried
Quoted 52 lines · Ramon Fried
Quoted 50 lines · Suneel Garapati

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300
Quoted 8 lines
Quoted 8 lines

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

Quoted 7 lines

RFC7440 is not supported by most TFTP Servers, when adding support for this feature I didn't even consider TFTPPUT.
I think that the best thing to do is to only support RFC7440 on TFTPGET. In this case we should remove the tftp_send() when sending a file. I will create a fix, would you mind testing to see if it works for you ? Thanks,
Ramon.

Quoted 8 lines

Yes, I can test the fix.

Thanks,
Suneel

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Regards,
Suneel

Thanks for spotting this, I'll check it out.

Hey Suneel
Now when I dived deeper, I just figured out that __tftpboot__ doesn't work for you with window size = 1.
This is very strange, my current setup is working also with this configuration. Can you please check which TFTP server you're using on the other end ?

Thanks,
Ramon.

#7 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 78 lines · Ramon Fried
Quoted 76 lines · Suneel Garapati
Quoted 62 lines · Ramon Fried
Quoted 52 lines · Ramon Fried
Quoted 50 lines · Suneel Garapati

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300
Quoted 8 lines
Quoted 8 lines

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

Quoted 7 lines

RFC7440 is not supported by most TFTP Servers, when adding support for this feature I didn't even consider TFTPPUT.
I think that the best thing to do is to only support RFC7440 on TFTPGET. In this case we should remove the tftp_send() when sending a file. I will create a fix, would you mind testing to see if it works for you ? Thanks,
Ramon.

Yes, I can test the fix.

Thanks,
Suneel

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Regards,
Suneel

Thanks for spotting this, I'll check it out.

Hey Suneel
Now when I dived deeper, I just figured out that __tftpboot__ doesn't work for you with window size = 1.
This is very strange, my current setup is working also with this configuration. Can you please check which TFTP server you're using on the other end ?

Did it work with/without CMD_TFTPPUT config option?
For me it fails only when this option is enabled.
What is the response on your setup from the server for the extra ack packet sent on the last block?
TFTP server is a tftpd-hpa service on ubuntu 18.04 machine with basic setup.

Quoted 3 lines

Thanks,
Ramon.

#8 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 89 lines · Suneel Garapati
Quoted 78 lines · Ramon Fried
Quoted 76 lines · Suneel Garapati
Quoted 62 lines · Ramon Fried
Quoted 52 lines · Ramon Fried
Quoted 50 lines · Suneel Garapati

Hello Ramon,

With TFTP window size as default 1 and enabling TFTPPUT config option results in tftpboot command failure.

Attached the pcap files for with and without TFTPPUT enabled. Both captures are the same except that the TFTPPUT option enables ICMP handler and for the response from the server triggers a restart of netloop operation and eventually fails as below.

Quoted 1 line

tftpboot 0x30000000 192.168.1.1:Image

Waiting for RPM0 LMAC0 link status... 10G_R [10G]
Using rvu_pf#0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.16 Filename 'Image'. Load address: 0x30000000
Loading: ################################################## 15.8 MiB 787.1 KiB/s
done
TFTP server died; starting again

Quoted 1 line

I see the code issue as below on net/tftp.c [v2020.10] ?

                /*
                 *      Acknowledge the block just received, which will prompt
                 *      the remote for the next one.
                 */
                if (tftp_cur_block == tftp_next_ack) {
                        tftp_send();
                        tftp_next_ack += tftp_windowsize;
                }

                if (len < tftp_block_size) {
                        //if (tftp_windowsize > 1) [Hack in use for
now to work around this issue]
                        tftp_send();                      [ This
causes extra ACK packet send with same block number and causes server
to respond with ICMP error]
                        tftp_complete();
                }

I couldn?t try with tftp_windowsize > 1 as the test servers don?t support. I tried with all latest commits on net/tftp.c on top of v2020.10 and still see the issue.

This change is introduced in
commit cc6b87ecaa96325577a8fafabc0d5972b816bc6c

Author: Ramon Fried <[email protected]>
Date:   Sat Jul 18 23:31:46 2020 +0300
Quoted 8 lines
Quoted 8 lines

net: tftp: Add client support for RFC 7440

Add support for RFC 7440: "TFTP Windowsize Option".

Reverting this commit on v2020.10 also fixes the issue.

I would like to know if this extra tftp_send is needed at all or only for window size > 1

Quoted 7 lines

RFC7440 is not supported by most TFTP Servers, when adding support for this feature I didn't even consider TFTPPUT.
I think that the best thing to do is to only support RFC7440 on TFTPGET. In this case we should remove the tftp_send() when sending a file. I will create a fix, would you mind testing to see if it works for you ? Thanks,
Ramon.

Yes, I can test the fix.

Thanks,
Suneel

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Regards,
Suneel

Thanks for spotting this, I'll check it out.

Hey Suneel
Now when I dived deeper, I just figured out that __tftpboot__ doesn't work for you with window size = 1.
This is very strange, my current setup is working also with this configuration. Can you please check which TFTP server you're using on the other end ?

Quoted 9 lines

Did it work with/without CMD_TFTPPUT config option?
For me it fails only when this option is enabled.
What is the response on your setup from the server for the extra ack packet sent on the last block?
TFTP server is a tftpd-hpa service on ubuntu 18.04 machine with basic setup.

Quoted 3 lines

Thanks,
Ramon.

OK. Found the problem. sending a patch.

#9 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

In reply to Ramon Fried
Quoted 11 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.

this commit breaks my TFTP Setup. I run into lot of timeouts and most of the times I can't load the kernel or the dtb.

Using ethernet at 5b040000 device
TFTP from server 192.168.100.99; our IP address is 192.168.100.96 Filename 'Image'.
Load address: 0x80280000
Loading: #T T T T T T T

On bisecting between 2020.07 and 2020.10 I stumbled across this commit. reverting it fix the issue immediately.

Some clue why the default windowsize set 1 breaks it for me?

Best regards,

Oliver

#10 lore raw

PATCH v5 1/1 net: tftp: Add client support for RFC 7440

Quoted 22 lines · Oliver Graute
Quoted 11 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.

this commit breaks my TFTP Setup. I run into lot of timeouts and most of the times I can't load the kernel or the dtb.

Using ethernet at 5b040000 device
TFTP from server 192.168.100.99; our IP address is 192.168.100.96 Filename 'Image'.
Load address: 0x80280000
Loading: #T T T T T T T

Quoted 4 lines

On bisecting between 2020.07 and 2020.10 I stumbled across this commit. reverting it fix the issue immediately.

Some clue why the default windowsize set 1 breaks it for me?

ok found the patch that fixed the issue myself

https://lists.denx.de/pipermail/u-boot/2021-February/439845.html

Best regards,

Oliver