net: Change the NFS_TIMEOUT to 20s for using nfs load image.
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
From: Jin Qing <[email protected]>
The NFS_TIMEOUT is 2s before. It is too short for some nfs server to respond.
---
We are not sure what is the expected timeout period. Using 20s to make sure the mount works.
net/nfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/nfs.c +1 -1
@@ -33,7 +33,7 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 -#define NFS_TIMEOUT 2000UL +#define NFS_TIMEOUT 20000ULstatic int fs_mounted =0 ;static unsigned long rpc_id =0 ;
Signature · 1 line
1.6.6-rc1.GIT
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Dear Li Yang,
Quoted 17 lines · In message <[email protected]> you wrote:
From: Jin Qing <[email protected]>
The
NFS_TIMEOUTis 2s before. It is too short for some nfs server to respond.Signed-off-by Jin Qing <[email protected]>---
We are not sure what is the expected timeout period. Using 20s to make sure the mount works.net/nfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/nfs.c +0
-0
net/nfs.c line 36
Quoted 5 lines
net/nfs.c +1
-1@@ -33,7 +33,7 @@#define HASHES_PER_LINE 65/* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 -#define NFS_TIMEOUT 2000UL +#define NFS_TIMEOUT 20000UL
You mean 30 retries (NFS_RETRY_COUNT) every two seconds were not sufficient in your case?
That's a full minute...
Waiting 10 minutes for a command to complete seems way too long to me.
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 Always leave room to add an explanation if it doesn't work out.
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Quoted 29 lines · Wolfgang Denk
Dear Li Yang,
Quoted 20 lines · In message <[email protected]> you wrote:
From: Jin Qing <[email protected]>
The
NFS_TIMEOUTis 2s before. ?It is too short for some nfs server to respond.Signed-off-by Jin Qing <[email protected]>---
We are not sure what is the expected timeout period. ?Using 20s to make sure the mount works.?net/nfs.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)net/nfs.c +0
-0@@ -33,7 +33,7 @@?#define
HASHES_PER_LINE65 ? /* Number of "loading" hashes per line ?*/ ?#defineNFS_RETRY_COUNT30net/nfs.c line 36
Quoted 2 lines
net/nfs.c +1
-1-#define NFS_TIMEOUT 2000UL +#define NFS_TIMEOUT 20000ULYou mean 30 retries (
NFS_RETRY_COUNT) every two seconds were not sufficient in your case?
Quoted 1 line
That's a full minute...
It didn't retry 30 times before it fails completely in our test:
Load address: 0x400000
Loading: T T T T T *** ERROR: Cannot mount
T T *** ERROR: Cannot umount
Looks like the state machine is not working as expected?
- Leo
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Dear Li Yang,
Quoted 10 lines · In message <[email protected]> you…
Quoted 9 lines
net/nfs.c line 36
Quoted 4 lines
#define
NFS_RETRY_COUNT30net/nfs.c +1
-1-#define NFS_TIMEOUT 2000UL +#define NFS_TIMEOUT 20000ULYou mean 30 retries (
NFS_RETRY_COUNT) every two seconds were not sufficient in your case?That's a full minute...
Quoted 7 lines
It didn't retry 30 times before it fails completely in our test:
Load address:
0x400000
Loading: T T T T T *** ERROR: Cannot mount
T T *** ERROR: Cannot umountLooks like the state machine is not working as expected?
...or something else is causing errors.
I have never seen such behaviour yet. Please try and debug it. Simply raising the timeout limit seems the wrong approach to me.
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 When the bosses talk about improving productivity, they are never talking about themselves.
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Dear Wolfgang,
The work flow is that:
Every "timeout" is reached, it will call NfsSend() and whatever the state is finally it will call rpc_req() which will increase the rpc_id value every time. The rpc_id value is increased but the reply.id is not increased by "timeout". This makes the judgement statement:
If (ntohl(rpc_pkt.u.reply.id) != rpc_id) is true and it will return -1. Then we got the error message: *** ERROR: Cannot mount.
So far, I am raising the timeout limit to avoid rpc_id being increased unexpectedly.
Do you have any suggestion about this issue?
Best Regards,
Jin Qing
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: 2010?8?16? 18:46
To: Li Yang-R58472
Cc: u-boot at lists.denx.de; Jin Qing-B24347
Subject: Re: [U-Boot] [PATCH] net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Dear Li Yang,
Quoted 10 lines · In message <[email protected]> you…
Quoted 9 lines
net/nfs.c line 36
Quoted 4 lines
#define
NFS_RETRY_COUNT30net/nfs.c +1
-1-#define NFS_TIMEOUT 2000UL +#define NFS_TIMEOUT 20000ULYou mean 30 retries (
NFS_RETRY_COUNT) every two seconds were not sufficient in your case?That's a full minute...
Quoted 7 lines
It didn't retry 30 times before it fails completely in our test:
Load address:
0x400000
Loading: T T T T T *** ERROR: Cannot mount T T *** ERROR: Cannot umountLooks like the state machine is not working as expected?
...or something else is causing errors.
I have never seen such behaviour yet. Please try and debug it. Simply raising the timeout limit seems the wrong approach to me.
Best regards,
Wolfgang Denk
Signature · 3 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 When the bosses talk about improving productivity, they are never talking about themselves.
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Dear Jin Qing-B24347,
Quoted 11 lines · In message <F37F9B48E0E59D42A5F9491A3CAD99AD7E8E37@zch01exm28.fsl.freescale.net…
The work flow is that:
Every "timeout" is reached, it will callNfsSend()and whatever the state is finally it will callrpc_req()which will increase therpc_idvalue every time. Therpc_idvalue is increased but the reply.id is not increased by "timeout". This makes the judgement statement:
If (ntohl(rpc_pkt.u.reply.id)!=rpc_id) is true and it will return -1. Then we got the error message: *** ERROR: Cannot mount.So far, I am raising the timeout limit to avoid
rpc_idbeing increased unexpectedly.
What sort of NFS server is this?
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 "Have you lived in this village all your life?" "No, not yet."
PATCH 1/1 net: Change the NFS_TIMEOUT to 20s for using nfs load image.
Dear Wolfgang
Quoted 6 lines
Quoted 6 lines
The work flow is that:
Every "timeout" is reached, it will callNfsSend()and whatever the state is finally it will callrpc_req()which will increase therpc_idvalue every time. Therpc_idvalue is increased but the reply.id is not increased by "timeout". This makes the judgement
statement:
Quoted 4 lines
Quoted 4 lines
If (
ntohl(rpc_pkt.u.reply.id)!=rpc_id) is true and it will return -1. Then we got the error message: *** ERROR: Cannot mount.So far, I am raising the timeout limit to avoid
rpc_idbeing
increased
Quoted 3 lines
Quoted 1 line
unexpectedly.
What sort of NFS server is this?
It is a Debian NFS server.
Best regards,
Jin Qing