
Hi Pavel, Joe,
On Tue, Aug 25, 2015 at 7:44 PM, Pavel Machek pavel@denx.de wrote:
tftp timeout of 100msec gives good performance on local ethernet, but some servers (Centos) refuse to operate, and it is against RFC 2349.
This fixes regression caused by 620776d734e4b126c407f636bda825a594a17723 .
This patch does not fix the issue properly. As the commit 620776d also changed the "<1000" test logic to "<10", which should not be. See my comments below.
Signed-off-by: Pavel Machek pavel@denx.de
diff --git a/net/tftp.c b/net/tftp.c index 18ce84c..e919638 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -18,8 +18,9 @@
/* Well known TFTP port # */ #define WELL_KNOWN_PORT 69 -/* Millisecs to timeout for lost pkt */ -#define TIMEOUT 100UL +/* Millisecs to timeout for lost pkt. Anything below 1000msec is against RFC, and
- some servers will refuse it. */
Nits: please use correct multi-line comment format.
+#define TIMEOUT 1000UL #ifndef CONFIG_NET_RETRY_COUNT /* # of timeouts before giving up */ # define TIMEOUT_COUNT 1000
--
I still would like to revert commit 620776d (IOW, apply my revert patch @ http://patchwork.ozlabs.org/patch/510389/). Then Pavel to submit a new patch to change only TIMEOUT_COUNT to something larger (I am still not convinced that we need change the retry count from 10 to 1000). Perhaps with a better comment in the codes to explain why a larger TIMEOUT_COUNT is needed.
Regards, Bin