Message ID | 1453490307-15209-1-git-send-email-amessier.tyco@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Joe Hershberger |
Headers | show |
On Fri, Jan 22, 2016 at 1:18 PM, <amessier.tyco@gmail.com> wrote: > From: Alexandre Messier <amessier@tycoint.com> > > 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. > > Signed-off-by: Alexandre Messier <amessier@tycoint.com> > --- > README | 5 +++++ > net/tftp.c | 4 ++++ > 2 files changed, 9 insertions(+) > > diff --git a/README b/README > index ece4793..9d53c2e 100644 > --- a/README > +++ b/README > @@ -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. > CONFIG_ARP_TIMEOUT > > Timeout waiting for an ARP reply in milliseconds. > diff --git a/net/tftp.c b/net/tftp.c > index f2889fe..884cfaa 100644 > --- a/net/tftp.c > +++ b/net/tftp.c > @@ -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@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot
> -----Original Message----- > From: Joe Hershberger [mailto:joe.hershberger@gmail.com] > Sent: January-22-16 2:29 PM > To: amessier.tyco@gmail.com > Cc: u-boot; Joe Hershberger; MESSIER, ALEXANDRE > Subject: Re: [U-Boot] [PATCH] net: tftp: Add TFTP specific config for retry > count > > On Fri, Jan 22, 2016 at 1:18 PM, <amessier.tyco@gmail.com> wrote: > > From: Alexandre Messier <amessier@tycoint.com> > > > > 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. > > > > Signed-off-by: Alexandre Messier <amessier@tycoint.com> > > --- > > README | 5 +++++ > > net/tftp.c | 4 ++++ > > 2 files changed, 9 insertions(+) > > > > diff --git a/README b/README > > index ece4793..9d53c2e 100644 > > --- a/README > > +++ b/README > > @@ -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. OK will fix. > > > CONFIG_ARP_TIMEOUT > > > > Timeout waiting for an ARP reply in milliseconds. > > diff --git a/net/tftp.c b/net/tftp.c > > index f2889fe..884cfaa 100644 > > --- a/net/tftp.c > > +++ b/net/tftp.c > > @@ -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@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=
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! > -----Original Message----- > From: Joe Hershberger [mailto:joe.hershberger@gmail.com] > Sent: January-22-16 2:29 PM > To: amessier.tyco@gmail.com > Cc: u-boot; Joe Hershberger; MESSIER, ALEXANDRE > Subject: Re: [U-Boot] [PATCH] net: tftp: Add TFTP specific config for retry > count > > On Fri, Jan 22, 2016 at 1:18 PM, <amessier.tyco@gmail.com> wrote: > > From: Alexandre Messier <amessier@tycoint.com> > > > > 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. > > > > Signed-off-by: Alexandre Messier <amessier@tycoint.com> > > --- > > README | 5 +++++ > > net/tftp.c | 4 ++++ > > 2 files changed, 9 insertions(+) > > > > diff --git a/README b/README > > index ece4793..9d53c2e 100644 > > --- a/README > > +++ b/README > > @@ -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. > > > CONFIG_ARP_TIMEOUT > > > > Timeout waiting for an ARP reply in milliseconds. > > diff --git a/net/tftp.c b/net/tftp.c > > index f2889fe..884cfaa 100644 > > --- a/net/tftp.c > > +++ b/net/tftp.c > > @@ -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@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 > > D3jUKeOClnVoZZOSb93LtGg4Qgmpmjw&m=9unHvE5XXKyF- > lM3U6pF9XpWvcC8xlNgyTBS > > nEPIi6k&s=iNlpx7rwu413FslQ29XOXe1QNlTHfFNrF_Ej2NKr2T8&e=
diff --git a/README b/README index ece4793..9d53c2e 100644 --- a/README +++ b/README @@ -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. diff --git a/net/tftp.c b/net/tftp.c index f2889fe..884cfaa 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -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