net: nfs: extend NFS_TIMEOUT
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
I tried nfs command on KZM-A9-GT board and it fails every time with "ERROR: Cannot umount". Current NFS_TIMEOUT value is 2000UL. It seems too short. I changed this to 10000UL then it succeeds.
--- net/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/nfs.c +1 -1
@@ -31,7 +31,7 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 -#define NFS_TIMEOUT 2000UL +#define NFS_TIMEOUT 10000ULstatic int fs_mounted;static unsigned long rpc_id;
Signature · 1 line
1.7.9.5
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Dear Tetsuyuki Kobayashi,
Quoted 1 line · In message <[email protected]> you wrote:
I tried nfs command on KZM-A9-GT board and it fails every time with "ERROR: Cannot umount".
KZM-A9-GT board? This is an out of tree port, isn't it?
Are you sure the problems are not in the board specific code?
Quoted 1 line
Current
NFS_TIMEOUTvalue is 2000UL. It seems too short. I changed this to 10000UL then it succeeds.
Please don't modify global code when you just need different settings for a single piece of hardware. Especially here, were there are chances that the problems are actually in the board support code, and not in the global network code.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "One planet is all you get."
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Hello, Wolfgang Denk,
Thank you for responding.
Quoted 4 lines · Wolfgang Denk
Quoted 1 line · In message <[email protected]> you wrote:
I tried nfs command on KZM-A9-GT board and it fails every time with "ERROR: Cannot umount".
KZM-A9-GT board? This is an out of tree port, isn't it?
Not yet, but trying now.
Quoted 2 lines
Are you sure the problems are not in the board specific code?
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
Quoted 7 lines
Quoted 2 lines
Current
NFS_TIMEOUTvalue is 2000UL. It seems too short. I changed this to 10000UL then it succeeds.Please don't modify global code when you just need different settings for a single piece of hardware. Especially here, were there are chances that the problems are actually in the board support code, and not in the global network code.
Yes. I understand.
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Hello,
Quoted 11 lines · Tetsuyuki Kobayashi
Quoted 4 lines · Wolfgang Denk
Quoted 1 line · In message<[email protected]> you wrote:
I tried nfs command on KZM-A9-GT board and it fails every time with "ERROR: Cannot umount".
KZM-A9-GT board? This is an out of tree port, isn't it?
Not yet, but trying now.
Quoted 2 lines
Are you sure the problems are not in the board specific code?
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
I did on a panda board. It has the same problem and this patch solves it. So this is not board specific problem. Please consider to change global setting of NFS_TIMEOUT in nfs.c. I hope someone else tries nfs command on the other board.
Following is the detail I did:
The default config of pand board disables NFS command. So add this line in omap4_panda.h
#define COFNIG_CMD_NFS
(This line must be after #include configs/omap4_common.h>
I had trouble to use network on a panda board at the source from u-boot master git. Instead, I used source code from Linaro git.
(I think this is another issue. Just focus NFS timeout now.)
Before applying the patch: error occurs like this.
Panda # usb start
(Re)start USB...
USB: Register 1313 NbrPorts 3
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found scanning bus for ethernet devices... 1 Ethernet Device(s) found
Panda # setenv ipaddr 192.168.1.162
Panda # setenv serverip 192.168.1.110
Panda # nfs /export/tmp/uImage
Waiting for Ethernet connection... done.
Using sms0 device
File transfer via NFS from server 192.168.1.110; our IP address is 192.168.1.162 Filename '/export/tmp/uImage'.
Load address: 0x82000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################T T *** ERROR: Cannot umountPanda #
After applying the patch: it seems OK.
Panda # usb start
(Re)start USB...
USB: Register 1313 NbrPorts 3
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found scanning bus for ethernet devices... 1 Ethernet Device(s) found
Panda # setenv ipaddr 192.168.1.162
Panda # setenv serverip 192.168.1.110
Panda # nfs /export/tmp/uImage
Waiting for Ethernet connection... done.
Using sms0 device
File transfer via NFS from server 192.168.1.110; our IP address is 192.168.1.162 Filename '/export/tmp/uImage'.
Load address: 0x82000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################done
Bytes transferred = 2230644 (220974 hex)
Panda #
--
Tetsuyuki Kobayashi
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Dear Tetsuyuki Kobayashi,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Quoted 2 lines
Are you sure the problems are not in the board specific code?
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
I did on a panda board. It has the same problem and this patch solves it. So this is not board specific problem. Please consider to change global setting of
NFS_TIMEOUTinnfs.c.
net/nfs.c is not the right place to make board specific adjustments.
I am still not convinced this is an issue with the global code. It could be your NFS server as well.
If there are really boards which need longer timeouts, these should be set in the board config files.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. - Ambrose Bierce
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Hi Tetsuyuki,
Quoted 5 lines · Wolfgang Denk
Dear Tetsuyuki Kobayashi,
Quoted 2 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Quoted 2 lines
Are you sure the problems are not in the board specific code?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
I did on a panda board. It has the same problem and this patch solves it. So this is not board specific problem. Please consider to change global setting of
NFS_TIMEOUTinnfs.c.
net/nfs.cis not the right place to make board specific adjustments.I am still not convinced this is an issue with the global code. ?It could be your NFS server as well.
I'm not convinced either. It clearly depends on the speed of your server, the speed of the connection, the size of the file you are transferring, etc.
Quoted 2 lines
If there are really boards which need longer timeouts, these should be set in the board config files.
In fact I would rather the constant were not defined there at all... but it is.
At a minimum it should look like this:
#define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */
#define NFS_RETRY_COUNT 30
+#ifdef CONFIG_NFS_TIMEOUT
+#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT
+#else
#define NFS_TIMEOUT 2000UL
+#endif
static int fs_mounted;
static unsigned long rpc_id;
...with CONFIG_NFS_TIMEOUT defined for your board.
-Joe
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Quoted 12 lines · Joe Hershberger
Hi Tetsuyuki,
Quoted 9 lines · Wolfgang Denk
Dear Tetsuyuki Kobayashi,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Quoted 2 lines
Are you sure the problems are not in the board specific code?
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
I did on a panda board. It has the same problem and this patch solves it. So this is not board specific problem. Please consider to change global setting of
NFS_TIMEOUTinnfs.c.
Quoted 8 lines
Quoted 4 lines
net/nfs.cis not the right place to make board specific adjustments.I am still not convinced this is an issue with the global code. It could be your NFS server as well.
I'm not convinced either. It clearly depends on the speed of your server, the speed of the connection, the size of the file you are transferring, etc.
Is the timeout for completing the transfer, or for making forward progress?
-Scott
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
Hi Scott,
Quoted 15 lines · Scott Wood
Quoted 14 lines · Joe Hershberger
Hi Tetsuyuki,
Quoted 11 lines · Wolfgang Denk
Dear Tetsuyuki Kobayashi,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Quoted 2 lines
Are you sure the problems are not in the board specific code?
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
I did on a panda board. It has the same problem and this patch solves it. So this is not board specific problem. Please consider to change global setting of
NFS_TIMEOUTinnfs.c.
net/nfs.cis not the right place to make board specific adjustments.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I am still not convinced this is an issue with the global code. ?It could be your NFS server as well.
I'm not convinced either. ?It clearly depends on the speed of your server, the speed of the connection, the size of the file you are transferring, etc.
Is the timeout for completing the transfer, or for making forward progress?
The timeout is reset each time that NetSetTimeout() is called. For NFS, that happens when a transfer starts, when the timeout occurs (a retry begins), and when a "read request" response comes from the server. I would bet that means it should be a timeout for making progress, but I'm not an NFS protocol expert.
-Joe
RFC PATCH 1/1 net: nfs: extend NFS_TIMEOUT
In reply to Joe HershbergerHi Joe, Thank you for responding.
Quoted 10 lines · Joe Hershberger
Quoted 9 lines · Wolfgang Denk
Dear Tetsuyuki Kobayashi,
Quoted 5 lines · In message<[email protected]> you wrote:
Quoted 3 lines
Quoted 2 lines
Are you sure the problems are not in the board specific code?
OK. I will try the same thing on an in-tree board (maybe, panda board) to check if this is board specific or not.
I did on a panda board. It has the same problem and this patch solves it. So this is not board specific problem. Please consider to change global setting of
NFS_TIMEOUTinnfs.c.
Quoted 9 lines
Quoted 4 lines
net/nfs.cis not the right place to make board specific adjustments.I am still not convinced this is an issue with the global code. It could be your NFS server as well.
I'm not convinced either. It clearly depends on the speed of your server, the speed of the connection, the size of the file you are transferring, etc.
Yes, NFS_TIMEOUT should be configurable.
Quoted 20 lines
Quoted 2 lines
If there are really boards which need longer timeouts, these should be set in the board config files.
In fact I would rather the constant were not defined there at all... but it is.
At a minimum it should look like this:
#define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30(quoted diff) +4
-0+#ifdef CONFIG_NFS_TIMEOUT +#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#else #define NFS_TIMEOUT 2000UL +#endif static int fs_mounted; static unsigned long rpc_id;
Quoted 2 lines
...with
CONFIG_NFS_TIMEOUTdefined for your board.
Thanks. I agree this change.
RFC PATCH 1/1 net: nfs: make NFS_TIMEOUT configurable
In reply to Joe HershbergerNFS_TIMEOUT is constant value defined in net/nfs.c. But sometimes it needs to adjust. This patch enables to override NFS_TIMEOUT by defining CONFIG_NFS_TIMEOUT in a board specific config file.
---
Hello,
I made a patch from Joe's idea.
net/nfs.c | 5 +++++ 1 file changed, 5 insertions(+)
net/nfs.c +5 -0
@@ -31,7 +31,12 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 +#ifdef CONFIG_NFS_TIMEOUT +#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#error "" +#else #define NFS_TIMEOUT 2000UL +#endif static int fs_mounted;static unsigned long rpc_id;
Signature · 1 line
1.7.9.5
RFC PATCH 1/1 net: nfs: make NFS_TIMEOUT configurable
Quoted 17 lines · Tetsuyuki Kobayashi
NFS_TIMEOUTis constant value defined innet/nfs.c. But sometimes it needs to adjust. This patch enables to overrideNFS_TIMEOUTby definingCONFIG_NFS_TIMEOUTin a board specific config file.Signed-off-by Tetsuyuki Kobayashi <[email protected]>---
Hello,I made a patch from Joe's idea.
net/nfs.c| 5 +++++1 file changed, 5 insertions(+)net/nfs.c +0
-0
net/nfs.c line 36
Quoted 6 lines
net/nfs.c +3
-0@@ -31,7 +31,12 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 +#ifdef CONFIG_NFS_TIMEOUT +#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#error ""
Why error?
Quoted 8 lines
net/nfs.c +2
-0+#else #define NFS_TIMEOUT 2000UL +#endif static int fs_mounted;static unsigned long rpc_id;Signature · 1 line
1.7.9.5
RFC PATCH 1/1 net: nfs: make NFS_TIMEOUT configurable
Hello Joe, thanks to responding.
Quoted 22 lines · Joe Hershberger
Quoted 18 lines · Tetsuyuki Kobayashi
NFS_TIMEOUTis constant value defined innet/nfs.c. But sometimes it needs to adjust. This patch enables to overrideNFS_TIMEOUTby definingCONFIG_NFS_TIMEOUTin a board specific config file.Signed-off-by Tetsuyuki Kobayashi <[email protected]>---
Hello,I made a patch from Joe's idea.
net/nfs.c| 5 +++++1 file changed, 5 insertions(+)net/nfs.c +0
-0@@ -31,7 +31,12 @@
Quoted 8 lines
net/nfs.c line 36
Quoted 5 lines
net/nfs.c +3
-0#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 +#ifdef CONFIG_NFS_TIMEOUT +#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#error ""Why error?
Oh, I'm sorry. It is mistake. I checked both case inserting #error and forgot to remove.. I will post V2.
Quoted 8 lines
Quoted 8 lines
net/nfs.c +2
-0+#else #define NFS_TIMEOUT 2000UL +#endif static int fs_mounted;static unsigned long rpc_id;Signature · 1 line
1.7.9.5
RFC PATCH v2 1/1 net: nfs: make NFS_TIMEOUT configurable
NFS_TIMEOUT is constant value defined in net/nfs.c. But sometimes it needs to adjust. This patch enables to override NFS_TIMEOUT by defining CONFIG_NFS_TIMEOUT in a board specific config file. For example,
#define CONFIG_NFS_TIMEOUT 10000UL
---
Changes for v2:
- remove a wrong #error line
net/nfs.c | 4 ++++ 1 file changed, 4 insertions(+)
net/nfs.c +4 -0
@@ -31,7 +31,11 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 +#ifdef CONFIG_NFS_TIMEOUT +#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#else #define NFS_TIMEOUT 2000UL +#endif static int fs_mounted;static unsigned long rpc_id;
Signature · 1 line
1.7.9.5
RFC PATCH v2 1/1 net: nfs: make NFS_TIMEOUT configurable
Dear Tetsuyuki Kobayashi,
Quoted 4 lines · In message <[email protected]> you wrote:
NFS_TIMEOUTis constant value defined innet/nfs.c. But sometimes it needs to adjust. This patch enables to overrideNFS_TIMEOUTby definingCONFIG_NFS_TIMEOUTin a board specific config file. For example,
#defineCONFIG_NFS_TIMEOUT10000UL
Please add documentation to the new CONFIG_ option to the README.
Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The price one pays for pursuing any profession, or calling, is an intimate knowledge of its ugly side. - James Baldwin
RFC PATCH v3 1/1 net: nfs: make NFS_TIMEOUT configurable
NFS_TIMEOUT is constant value defined in net/nfs.c. But sometimes it needs to adjust. This patch enables to override NFS_TIMEOUT by defining CONFIG_NFS_TIMEOUT in a board specific config file.
---
Changes for v2:
- remove a wrong #error line
Changes for v3:
- add CONFIG_NFS_TIMEOUT after CONFIG_ARP_TIMEOUT in README file
- align #ifndef - #else - #endif format as same as tftp.c
README | 7 +++++++ net/nfs.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-)
README +7 -0
@@ -2140,6 +2140,13 @@ The following options need to be configured: Timeout waiting for an ARP reply in milliseconds. + CONFIG_NFS_TIMEOUT + + Timeout in milliseconds used in NFS protocol. + If you encounter "ERROR: Cannot umount" in nfs command, + try longer timeout such as + #define CONFIG_NFS_TIMEOUT 10000UL + - Command Interpreter: CONFIG_AUTO_COMPLETE
net/nfs.c +5 -1
@@ -31,7 +31,11 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 -#define NFS_TIMEOUT 2000UL +#ifndef CONFIG_NFS_TIMEOUT +# define NFS_TIMEOUT 2000UL +#else +# define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#endif static int fs_mounted;static unsigned long rpc_id;
Signature · 1 line
1.7.9.5
RFC PATCH v3 1/1 net: nfs: make NFS_TIMEOUT configurable
Dear Joe Hershberger,
How is this patch's status?
Quoted 51 lines · Tetsuyuki Kobayashi
NFS_TIMEOUTis constant value defined innet/nfs.c. But sometimes it needs to adjust. This patch enables to overrideNFS_TIMEOUTby definingCONFIG_NFS_TIMEOUTin a board specific config file.Signed-off-by Tetsuyuki Kobayashi <[email protected]>---
Changes for v2:
- remove a wrong #error line
Changes for v3:
- addCONFIG_NFS_TIMEOUTafterCONFIG_ARP_TIMEOUTin README file
- align #ifndef - #else - #endif format as same astftp.cREADME | 7 +++++++ net/nfs.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-)README +7
-0@@ -2140,6 +2140,13 @@ The following options need to be configured: Timeout waiting for an ARP reply in milliseconds. + CONFIG_NFS_TIMEOUT + + Timeout in milliseconds used in NFS protocol. + If you encounter "ERROR: Cannot umount" in nfs command, + try longer timeout such as + #define CONFIG_NFS_TIMEOUT 10000UL + - Command Interpreter: CONFIG_AUTO_COMPLETEnet/nfs.c +5
-1@@ -31,7 +31,11 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 -#define NFS_TIMEOUT 2000UL +#ifndef CONFIG_NFS_TIMEOUT +# define NFS_TIMEOUT 2000UL +#else +# define NFS_TIMEOUT CONFIG_NFS_TIMEOUT +#endif static int fs_mounted;static unsigned long rpc_id;
RFC PATCH v3 1/1 net: nfs: make NFS_TIMEOUT configurable
Hi Tetsuyuki Kobayashi,
Quoted 3 lines · Tetsuyuki Kobayashi
Dear Joe Hershberger,
How is this patch's status?
Someone marked it as RFC in patchwork, so I lost track of it.
I'll apply it to next.
Thanks,
-Joe
RFC PATCH v3 1/1 net: nfs: make NFS_TIMEOUT configurable
Quoted 8 lines · Joe Hershberger
Hi Tetsuyuki Kobayashi,
Quoted 3 lines · Tetsuyuki Kobayashi
Dear Joe Hershberger,
How is this patch's status?
Someone marked it as RFC in patchwork, so I lost track of it.
That would be me (went and took everything with RFC in the subject, marked it as RFC). Sorry for the inconvienece!
Signature · 1 line
Tom
RFC PATCH v3 1/1 net: nfs: make NFS_TIMEOUT configurable
Hi Tom,
Quoted 4 lines · Tom Rini
Quoted 3 lines · Joe Hershberger
Hi Tetsuyuki Kobayashi,
On Thu, Jul 12, 2012 at 2:30 AM, Tetsuyuki Kobayashi <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Dear Joe Hershberger,
How is this patch's status?
Someone marked it as RFC in patchwork, so I lost track of it.
That would be me (went and took everything with RFC in the subject, marked it as RFC). Sorry for the inconvienece!
No problem... the RFC should have been removed from the subject line if Tetsuyuki Kobayashi expected it to be applied.
Thanks,
-Joe
RFC PATCH v3 1/1 net: nfs: make NFS_TIMEOUT configurable
Hi Joe, Tom,
Quoted 11 lines · Joe Hershberger
Hi Tom,
Quoted 8 lines · Tom Rini
Quoted 7 lines · Joe Hershberger
Hi Tetsuyuki Kobayashi,
Quoted 3 lines · Tetsuyuki Kobayashi
Dear Joe Hershberger,
How is this patch's status?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Someone marked it as RFC in patchwork, so I lost track of it.
That would be me (went and took everything with RFC in the subject, marked it as RFC). Sorry for the inconvienece!
No problem... the RFC should have been removed from the subject line if Tetsuyuki Kobayashi expected it to be applied.
OK. I will do so in next time. Thank you.