From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartlomiej Sieka Date: Fri, 19 Sep 2008 07:52:35 +0200 Subject: [U-Boot] [PATCH 1/3] net: Make TFTP server timeout configurable In-Reply-To: <48D27108.4060406@ge.com> References: <12217502093845-git-send-email-tur@semihalf.com> <12217502101894-git-send-email-tur@semihalf.com> <48D27108.4060406@ge.com> Message-ID: <48D33E23.3020502@semihalf.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jerry Van Baren wrote: > Bartlomiej Sieka wrote: >> There are two aspects of a TFTP transfer involving timeouts: >> 1. timeout waiting for initial server reply after sending RRQ >> 2. timeouts while transferring actual data from the server >> >> Since the upcoming auto-update feature attempts a TFTP download during >> each >> boot, it is undesirable to have a long delay when the TFTP server is not >> available. Thus, this commit makes the server timeout (1.) >> configurable by two >> global variables: >> >> TftpRRQTimeoutSecs >> TftpRRQTimeoutCountMax >> >> TftpRRQTimeoutSecs overrides default timeout when trying to connect to >> a TFTP >> server, TftpRRQTimeoutCountMax overrides default number of connection >> retries. >> The total delay when trying to download a file from a non-existing >> TFTP server >> is TftpRRQTimeoutSecs x TftpRRQTimeoutCountMax seconds. > > Hi Bartlomiej, > > Are seconds an appropriate scale factor for the timeout? Hi Jerry, The patch didn't introduce changes in this regard -- TFTP timeouts were defined in seconds originally. The patch makes the timeout behavior configurable, instead of being hardcoded, but the units remain the same: #define TIMEOUT 5UL /* Seconds to timeout for a lost pkt */ Regards, Bartlomiej Sieka