All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option
@ 2021-05-12  8:03 Tero Kristo
  2021-05-15 20:07 ` Ramon Fried
  2021-06-09 12:19 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Tero Kristo @ 2021-05-12  8:03 UTC (permalink / raw)
  To: u-boot

TFTP transfer size can be used to re-size the TFTP progress bar on
single line based on the server reported file size. The support for
this has been around from 2019, but it was never converted to proper
Kconfig.

While adding this new Kconfig, enable it by default for OMAP2+ and K3
devices also.

Signed-off-by: Tero Kristo <kristo@kernel.org>
---
v2: convert to proper Kconfig and add defaults for TI platforms

 net/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/Kconfig b/net/Kconfig
index c4b4dae064..ba0ca813ce 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -74,6 +74,17 @@ config TFTP_WINDOWSIZE
 	  before an ack response is required.
 	  The default TFTP implementation implies a window size of 1.
 
+config TFTP_TSIZE
+	bool "Track TFTP transfers based on file size option"
+	depends on CMD_TFTPBOOT
+	default y if (ARCH_OMAP2PLUS || ARCH_K3)
+	help
+	  By default, TFTP progress bar is increased for each received UDP
+	  frame, which can lead into long time being spent for sending
+	  data over the UART. Enabling this option, TFTP queries the file
+	  size from server, and if supported, limits the progress bar to
+	  50 characters total which fits on single line.
+
 config SERVERIP_FROM_PROXYDHCP
 	bool "Get serverip value from Proxy DHCP response"
 	help
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option
  2021-05-12  8:03 [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option Tero Kristo
@ 2021-05-15 20:07 ` Ramon Fried
  2021-05-15 20:50   ` Tom Rini
  2021-06-09 12:19 ` Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Ramon Fried @ 2021-05-15 20:07 UTC (permalink / raw)
  To: u-boot

On Wed, May 12, 2021 at 11:03 AM Tero Kristo <kristo@kernel.org> wrote:
>
> TFTP transfer size can be used to re-size the TFTP progress bar on
> single line based on the server reported file size. The support for
> this has been around from 2019, but it was never converted to proper
> Kconfig.
>
> While adding this new Kconfig, enable it by default for OMAP2+ and K3
> devices also.
>
> Signed-off-by: Tero Kristo <kristo@kernel.org>
> ---
> v2: convert to proper Kconfig and add defaults for TI platforms
>
>  net/Kconfig | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/net/Kconfig b/net/Kconfig
> index c4b4dae064..ba0ca813ce 100644
> --- a/net/Kconfig
> +++ b/net/Kconfig
> @@ -74,6 +74,17 @@ config TFTP_WINDOWSIZE
>           before an ack response is required.
>           The default TFTP implementation implies a window size of 1.
>
> +config TFTP_TSIZE
> +       bool "Track TFTP transfers based on file size option"
> +       depends on CMD_TFTPBOOT
> +       default y if (ARCH_OMAP2PLUS || ARCH_K3)
> +       help
> +         By default, TFTP progress bar is increased for each received UDP
> +         frame, which can lead into long time being spent for sending
> +         data over the UART. Enabling this option, TFTP queries the file
> +         size from server, and if supported, limits the progress bar to
> +         50 characters total which fits on single line.
> +
>  config SERVERIP_FROM_PROXYDHCP
>         bool "Get serverip value from Proxy DHCP response"
>         help
> --
> 2.17.1
>
Very good,
Two remarks, please use tools/moveconfig.py in order to automatically
move all defconfigs into the configuration you just created.
Second, don't add default here for the specific boards. add the option
on the board specific Kconfig.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option
  2021-05-15 20:07 ` Ramon Fried
@ 2021-05-15 20:50   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2021-05-15 20:50 UTC (permalink / raw)
  To: u-boot

On Sat, May 15, 2021 at 11:07:44PM +0300, Ramon Fried wrote:
> On Wed, May 12, 2021 at 11:03 AM Tero Kristo <kristo@kernel.org> wrote:
> >
> > TFTP transfer size can be used to re-size the TFTP progress bar on
> > single line based on the server reported file size. The support for
> > this has been around from 2019, but it was never converted to proper
> > Kconfig.
> >
> > While adding this new Kconfig, enable it by default for OMAP2+ and K3
> > devices also.
> >
> > Signed-off-by: Tero Kristo <kristo@kernel.org>
> > ---
> > v2: convert to proper Kconfig and add defaults for TI platforms
> >
> >  net/Kconfig | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/net/Kconfig b/net/Kconfig
> > index c4b4dae064..ba0ca813ce 100644
> > --- a/net/Kconfig
> > +++ b/net/Kconfig
> > @@ -74,6 +74,17 @@ config TFTP_WINDOWSIZE
> >           before an ack response is required.
> >           The default TFTP implementation implies a window size of 1.
> >
> > +config TFTP_TSIZE
> > +       bool "Track TFTP transfers based on file size option"
> > +       depends on CMD_TFTPBOOT
> > +       default y if (ARCH_OMAP2PLUS || ARCH_K3)
> > +       help
> > +         By default, TFTP progress bar is increased for each received UDP
> > +         frame, which can lead into long time being spent for sending
> > +         data over the UART. Enabling this option, TFTP queries the file
> > +         size from server, and if supported, limits the progress bar to
> > +         50 characters total which fits on single line.
> > +
> >  config SERVERIP_FROM_PROXYDHCP
> >         bool "Get serverip value from Proxy DHCP response"
> >         help
> > --
> > 2.17.1
> >
> Very good,
> Two remarks, please use tools/moveconfig.py in order to automatically
> move all defconfigs into the configuration you just created.

It's nice when that's done, but honestly not a big deal since it also
tends to lead to making the patch harder to merge due to merge
conflicts.

> Second, don't add default here for the specific boards. add the option
> on the board specific Kconfig.

I prefer them to be here, rather than in the board Kconfig files as that
second option makes more churn in the defconfig files I believe on
resyncs.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210515/9ef4a1a5/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option
  2021-05-12  8:03 [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option Tero Kristo
  2021-05-15 20:07 ` Ramon Fried
@ 2021-06-09 12:19 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2021-06-09 12:19 UTC (permalink / raw)
  To: Tero Kristo; +Cc: u-boot, lokeshvutla

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

On Wed, May 12, 2021 at 11:03:04AM +0300, Tero Kristo wrote:

> TFTP transfer size can be used to re-size the TFTP progress bar on
> single line based on the server reported file size. The support for
> this has been around from 2019, but it was never converted to proper
> Kconfig.
> 
> While adding this new Kconfig, enable it by default for OMAP2+ and K3
> devices also.
> 
> Signed-off-by: Tero Kristo <kristo@kernel.org>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-09 12:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  8:03 [PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option Tero Kristo
2021-05-15 20:07 ` Ramon Fried
2021-05-15 20:50   ` Tom Rini
2021-06-09 12:19 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.