All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE
@ 2020-04-22 12:18 Patrick Delaunay
  2020-04-22 12:18 ` [PATCH 2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE Patrick Delaunay
  2020-04-28 13:54 ` [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Delaunay @ 2020-04-22 12:18 UTC (permalink / raw)
  To: u-boot

Add help message for the CONFIG_TFTP_BLOCKSIZE default value,
as explain in tftp.c before migration in commit b618b3707633
("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

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

diff --git a/net/Kconfig b/net/Kconfig
index 96bbce1778..ac6d0cf8a6 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -44,5 +44,9 @@ config TFTP_BLOCKSIZE
 	default 1468
 	help
 	  Default TFTP block size.
+	  The MTU is typically 1500 for ethernet, so a TFTP block of
+	  1468 (MTU minus eth.hdrs) provides a good throughput with
+	  almost-MTU block sizes.
+	  You can also activate CONFIG_IP_DEFRAG to set a larger block.
 
 endif   # if NET
-- 
2.17.1

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

* [PATCH 2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE
  2020-04-22 12:18 [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE Patrick Delaunay
@ 2020-04-22 12:18 ` Patrick Delaunay
  2020-04-28 13:54   ` Tom Rini
  2020-04-28 13:54 ` [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Patrick Delaunay @ 2020-04-22 12:18 UTC (permalink / raw)
  To: u-boot

Remove the unneeded define TFTP_MTU_BLOCKSIZE.
Since the KConfig migration done by commit b618b3707633 ("net:
Convert CONFIG_TFTP_BLOCKSIZE to Kconfig"), CONFIG_TFTP_BLOCKSIZE
is always defined and can be used directly to avoid confusion
(fallback to 1468 in code is never used).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 net/tftp.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/net/tftp.c b/net/tftp.c
index 585eb6ef0c..be24e63075 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -133,14 +133,9 @@ static char tftp_filename[MAX_LEN];
  * almost-MTU block sizes.  At least try... fall back to 512 if need be.
  * (but those using CONFIG_IP_DEFRAG may want to set a larger block in cfg file)
  */
-#ifdef CONFIG_TFTP_BLOCKSIZE
-#define TFTP_MTU_BLOCKSIZE CONFIG_TFTP_BLOCKSIZE
-#else
-#define TFTP_MTU_BLOCKSIZE 1468
-#endif
 
 static unsigned short tftp_block_size = TFTP_BLOCK_SIZE;
-static unsigned short tftp_block_size_option = TFTP_MTU_BLOCKSIZE;
+static unsigned short tftp_block_size_option = CONFIG_TFTP_BLOCKSIZE;
 
 static inline int store_block(int block, uchar *src, unsigned int len)
 {
-- 
2.17.1

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

* [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE
  2020-04-22 12:18 [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE Patrick Delaunay
  2020-04-22 12:18 ` [PATCH 2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE Patrick Delaunay
@ 2020-04-28 13:54 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-04-28 13:54 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 22, 2020 at 02:18:25PM +0200, Patrick Delaunay wrote:

> Add help message for the CONFIG_TFTP_BLOCKSIZE default value,
> as explain in tftp.c before migration in commit b618b3707633
> ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig")
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Applied to u-boot/master, thanks!

-- 
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/20200428/4c11c900/attachment.sig>

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

* [PATCH 2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE
  2020-04-22 12:18 ` [PATCH 2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE Patrick Delaunay
@ 2020-04-28 13:54   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-04-28 13:54 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 22, 2020 at 02:18:26PM +0200, Patrick Delaunay wrote:

> Remove the unneeded define TFTP_MTU_BLOCKSIZE.
> Since the KConfig migration done by commit b618b3707633 ("net:
> Convert CONFIG_TFTP_BLOCKSIZE to Kconfig"), CONFIG_TFTP_BLOCKSIZE
> is always defined and can be used directly to avoid confusion
> (fallback to 1468 in code is never used).
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Applied to u-boot/master, thanks!

-- 
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/20200428/940573a3/attachment.sig>

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

end of thread, other threads:[~2020-04-28 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 12:18 [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE Patrick Delaunay
2020-04-22 12:18 ` [PATCH 2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE Patrick Delaunay
2020-04-28 13:54   ` Tom Rini
2020-04-28 13:54 ` [PATCH 1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE 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.