Skip to contentSkip to conversation

net: tftp: Add TFTP specific config for retry count

PATCH New amessier.tyco at gmail.com 3 participants 4 messages Jan 22, 2016 – Jan 28, 2016 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: tftp: Add TFTP specific config for retry count

From: Alexandre Messier <[email protected]>

There is currently one config option (CONFIG_NET_RETRY_COUNT) that is available to tune the retries of the network stack. Unfortunately, it is global to all protocols, and the value is interpreted differently in all of them.

Add a new config option that sets directly the number of retries specifically for TFTP.

---
 README     | 5 +++++
 net/tftp.c | 4 ++++
 2 files changed, 9 insertions(+)
README +5 -0
index ece4793..9d53c2e 100644
@@ -2845,6 +2845,11 @@ CBFS (Coreboot Filesystem) support
 		before giving up the operation. If not defined, a
 		default value of 5 is used.
 
+		CONFIG_NET_RETRY_COUNT_TFTP
+
+		Override CONFIG_NET_RETRY_COUNT for TFTP. If not defined,
+		falls back to CONFIG_NET_RETRY_COUNT.
+
 		CONFIG_ARP_TIMEOUT
 
 		Timeout waiting for an ARP reply in milliseconds.
net/tftp.c +4 -0
index f2889fe..884cfaa 100644
@@ -20,12 +20,16 @@
 #define WELL_KNOWN_PORT	69
 /* Millisecs to timeout for lost pkt */
 #define TIMEOUT		5000UL
+#ifndef CONFIG_NET_RETRY_COUNT_TFTP
 #ifndef	CONFIG_NET_RETRY_COUNT
 /* # of timeouts before giving up */
 # define TIMEOUT_COUNT	10
 #else
 # define TIMEOUT_COUNT  (CONFIG_NET_RETRY_COUNT * 2)
 #endif
+#else
+# define TIMEOUT_COUNT	CONFIG_NET_RETRY_COUNT_TFTP
+#endif
 /* Number of "loading" hashes per line (for checking the image size) */
 #define HASHES_PER_LINE	65
 
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 net: tftp: Add TFTP specific config for retry count

Quoted 21 lines · On Fri, Jan 22, 2016 at 1:18 PM, <[email protected]> wrote:

From: Alexandre Messier <[email protected]>

There is currently one config option (CONFIG_NET_RETRY_COUNT) that is available to tune the retries of the network stack. Unfortunately, it is global to all protocols, and the value is interpreted differently in all of them.

Add a new config option that sets directly the number of retries specifically for TFTP.

---
 README     | 5 +++++
 net/tftp.c | 4 ++++
 2 files changed, 9 insertions(+)
README +0 -0
index ece4793..9d53c2e 100644

README CBFS (Coreboot Filesystem) support · line 2852

Quoted 8 lines
README +5 -0
@@ -2845,6 +2845,11 @@ CBFS (Coreboot Filesystem) support
                before giving up the operation. If not defined, a
                default value of 5 is used.
 
+               CONFIG_NET_RETRY_COUNT_TFTP
+
+               Override CONFIG_NET_RETRY_COUNT for TFTP. If not defined,
+               falls back to CONFIG_NET_RETRY_COUNT.
+

If you want to add a new config option, it needs to be in the Kconfig system.

Quoted 31 lines
README +0 -0
                CONFIG_ARP_TIMEOUT
 
                Timeout waiting for an ARP reply in milliseconds.
net/tftp.c +4 -1
index f2889fe..884cfaa 100644
@@ -20,12 +20,16 @@
 #define WELL_KNOWN_PORT        69
 /* Millisecs to timeout for lost pkt */
 #define TIMEOUT                5000UL
+#ifndef CONFIG_NET_RETRY_COUNT_TFTP
 #ifndef        CONFIG_NET_RETRY_COUNT
 /* # of timeouts before giving up */
 # define TIMEOUT_COUNT 10
 #else
 # define TIMEOUT_COUNT  (CONFIG_NET_RETRY_COUNT * 2)
 #endif
+#else
+# define TIMEOUT_COUNT CONFIG_NET_RETRY_COUNT_TFTP
+#endif
 /* Number of "loading" hashes per line (for checking the image size) */
 #define HASHES_PER_LINE        65
 
--

2.7.0

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#2 lore raw

PATCH 1/1 net: tftp: Add TFTP specific config for retry count

Quoted 33 lines

-----Original Message-----
From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
Sent: January-22-16 2:29 PM
To: amessier.tyco at gmail.com
Cc: u-boot; Joe Hershberger; MESSIER, ALEXANDRE
Subject: Re: [U-Boot] [PATCH] net: tftp: Add TFTP specific config for retry count

Quoted 24 lines · On Fri, Jan 22, 2016 at 1:18 PM, <[email protected]> wrote:

From: Alexandre Messier <[email protected]>

There is currently one config option (CONFIG_NET_RETRY_COUNT) that is available to tune the retries of the network stack. Unfortunately, it is global to all protocols, and the value is interpreted differently in all of them.

Add a new config option that sets directly the number of retries specifically for TFTP.

---
 README     | 5 +++++
 net/tftp.c | 4 ++++
 2 files changed, 9 insertions(+)
README +0 -0
index ece4793..9d53c2e 100644
@@ -2845,6 +2845,11 @@ CBFS (Coreboot Filesystem) support
                before giving up the operation. If not defined, a
                default value of 5 is used.
 
Quoted 7 lines

README CBFS (Coreboot Filesystem) support · line 2852

Quoted 5 lines
README +5 -0
+               CONFIG_NET_RETRY_COUNT_TFTP
+
+               Override CONFIG_NET_RETRY_COUNT for TFTP. If not defined,
+               falls back to CONFIG_NET_RETRY_COUNT.
+

If you want to add a new config option, it needs to be in the Kconfig system.

OK will fix.

Quoted 28 lines
Quoted 28 lines
README +0 -0
                CONFIG_ARP_TIMEOUT
 
                Timeout waiting for an ARP reply in milliseconds.
net/tftp.c +4 -1
index f2889fe..884cfaa 100644
@@ -20,12 +20,16 @@
 #define WELL_KNOWN_PORT        69
 /* Millisecs to timeout for lost pkt */
 #define TIMEOUT                5000UL
+#ifndef CONFIG_NET_RETRY_COUNT_TFTP
 #ifndef        CONFIG_NET_RETRY_COUNT
 /* # of timeouts before giving up */
 # define TIMEOUT_COUNT 10
 #else
 # define TIMEOUT_COUNT  (CONFIG_NET_RETRY_COUNT * 2)
 #endif
+#else
+# define TIMEOUT_COUNT CONFIG_NET_RETRY_COUNT_TFTP
+#endif
 /* Number of "loading" hashes per line (for checking the image size) */
 #define HASHES_PER_LINE        65
 
--

2.7.0

Quoted 9 lines
Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://urldefense.proofpoint.com/v2/url?u=http-

3A__lists.denx.de_mailman_listinfo_u-2Dboot&d=CwIBaQ&c=0YGvTs3tT- VMy8_v51yLDw&r=adEdfGeVvAp5D3jUKeOClnVoZZOSb93LtGg4Qgmpmjw& m=9unHvE5XXKyF- lM3U6pF9XpWvcC8xlNgyTBSnEPIi6k&s=iNlpx7rwu413FslQ29XOXe1QNlTHfFN rF_Ej2NKr2T8&e=

________________________________

This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.

#3 lore raw

PATCH 1/1 net: tftp: Add TFTP specific config for retry count

In reply to Joe Hershberger

Hi Joe,

It turns out that commit f5fb734 "net: TFTP: variables cleanup and addition" implements the same functionality as this patch.

Please disregard this patch.

Thanks!

Quoted 66 lines

-----Original Message-----
From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
Sent: January-22-16 2:29 PM
To: amessier.tyco at gmail.com
Cc: u-boot; Joe Hershberger; MESSIER, ALEXANDRE
Subject: Re: [U-Boot] [PATCH] net: tftp: Add TFTP specific config for retry count

Quoted 21 lines · On Fri, Jan 22, 2016 at 1:18 PM, <[email protected]> wrote:

From: Alexandre Messier <[email protected]>

There is currently one config option (CONFIG_NET_RETRY_COUNT) that is available to tune the retries of the network stack. Unfortunately, it is global to all protocols, and the value is interpreted differently in all of them.

Add a new config option that sets directly the number of retries specifically for TFTP.

---
 README     | 5 +++++
 net/tftp.c | 4 ++++
 2 files changed, 9 insertions(+)
README +0 -0
index ece4793..9d53c2e 100644

README CBFS (Coreboot Filesystem) support · line 2852

Quoted 8 lines
README +5 -0
@@ -2845,6 +2845,11 @@ CBFS (Coreboot Filesystem) support
                before giving up the operation. If not defined, a
                default value of 5 is used.
 
+               CONFIG_NET_RETRY_COUNT_TFTP
+
+               Override CONFIG_NET_RETRY_COUNT for TFTP. If not defined,
+               falls back to CONFIG_NET_RETRY_COUNT.
+

If you want to add a new config option, it needs to be in the Kconfig system.

Quoted 25 lines
README +0 -0
                CONFIG_ARP_TIMEOUT
 
                Timeout waiting for an ARP reply in milliseconds.
net/tftp.c +3 -1
index f2889fe..884cfaa 100644
@@ -20,12 +20,16 @@
 #define WELL_KNOWN_PORT        69
 /* Millisecs to timeout for lost pkt */
 #define TIMEOUT                5000UL
+#ifndef CONFIG_NET_RETRY_COUNT_TFTP
 #ifndef        CONFIG_NET_RETRY_COUNT
 /* # of timeouts before giving up */
 # define TIMEOUT_COUNT 10
 #else
 # define TIMEOUT_COUNT  (CONFIG_NET_RETRY_COUNT * 2)  #endif
+#else
+# define TIMEOUT_COUNT CONFIG_NET_RETRY_COUNT_TFTP #endif
 /* Number of "loading" hashes per line (for checking the image size) */
 #define HASHES_PER_LINE        65
 
--

2.7.0

Quoted 9 lines
Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.denx.de_mail
man_listinfo_u-2Dboot&d=CwIBaQ&c=0YGvTs3tT-

VMy8_v51yLDw&r=adEdfGeVvAp5

Quoted 1 line

D3jUKeOClnVoZZOSb93LtGg4Qgmpmjw&m=9unHvE5XXKyF-

lM3U6pF9XpWvcC8xlNgyTBS

Quoted 1 line

nEPIi6k&s=iNlpx7rwu413FslQ29XOXe1QNlTHfFNrF_Ej2NKr2T8&e=

________________________________

This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.