All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] net: tftp: fix tftp server initialization
@ 2022-04-11 11:21 Arjan Minzinga Zijlstra
  2022-04-12 19:38 ` Ramon Fried
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan Minzinga Zijlstra @ 2022-04-11 11:21 UTC (permalink / raw)
  To: Ramon Fried; +Cc: u-boot, joe.hershberger

> On Thu, Mar 31, 2022 at 2:50 PM Arjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com> wrote:
> > Some globals where not properly initialized causing timeouts
> > as data packets where not immediately acknowledged.
> I don't see a scenario where these two variables will not be initialized.
> Can you please elaborate ?
These variables are only set on tftp oack packets (which are optional AFAIK) and in the tftp_start() function.
However when running the tftpsrv cmd, tftp_start_server() is called, which didn't initialized said variables.


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

* Re: [PATCH] net: tftp: fix tftp server initialization
  2022-04-11 11:21 [PATCH] net: tftp: fix tftp server initialization Arjan Minzinga Zijlstra
@ 2022-04-12 19:38 ` Ramon Fried
  0 siblings, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2022-04-12 19:38 UTC (permalink / raw)
  To: Arjan Minzinga Zijlstra; +Cc: u-boot, joe.hershberger

On Mon, Apr 11, 2022 at 2:21 PM Arjan Minzinga Zijlstra
<arjan.minzingazijlstra@fox-it.com> wrote:
>
> > On Thu, Mar 31, 2022 at 2:50 PM Arjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com> wrote:
> > > Some globals where not properly initialized causing timeouts
> > > as data packets where not immediately acknowledged.
> > I don't see a scenario where these two variables will not be initialized.
> > Can you please elaborate ?
> These variables are only set on tftp oack packets (which are optional AFAIK) and in the tftp_start() function.
> However when running the tftpsrv cmd, tftp_start_server() is called, which didn't initialized said variables.
>
OK. I understand. I'll rework your patch a bit and submit. thanks !

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

* Re: [PATCH] net: tftp: fix tftp server initialization
  2022-03-31  8:03 Arjan Minzinga Zijlstra
  2022-04-01 19:43 ` Ramon Fried
@ 2022-04-12 19:40 ` Ramon Fried
  1 sibling, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2022-04-12 19:40 UTC (permalink / raw)
  To: Arjan Minzinga Zijlstra; +Cc: u-boot, joe.hershberger

On Thu, Mar 31, 2022 at 2:50 PM Arjan Minzinga Zijlstra
<arjan.minzingazijlstra@fox-it.com> wrote:
>
> Some globals where not properly initialized causing timeouts
> as data packets where not immediately acknowledged.
>
> Signed-off-by: Arjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com>
> ---
>  net/tftp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index 62a9648474..9d5fe2f2d9 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -912,6 +912,8 @@ void tftp_start_server(void)
>         tftp_block_size = TFTP_BLOCK_SIZE;
>         tftp_cur_block = 0;
>         tftp_our_port = WELL_KNOWN_PORT;
> +       tftp_windowsize = 1;
> +       tftp_next_ack = tftp_windowsize;
>
>  #ifdef CONFIG_TFTP_TSIZE
>         tftp_tsize = 0;
> --
> 2.25.1
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

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

* Re: [PATCH] net: tftp: fix tftp server initialization
  2022-03-31  8:03 Arjan Minzinga Zijlstra
@ 2022-04-01 19:43 ` Ramon Fried
  2022-04-12 19:40 ` Ramon Fried
  1 sibling, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2022-04-01 19:43 UTC (permalink / raw)
  To: Arjan Minzinga Zijlstra; +Cc: u-boot, joe.hershberger

On Thu, Mar 31, 2022 at 2:50 PM Arjan Minzinga Zijlstra
<arjan.minzingazijlstra@fox-it.com> wrote:
>
> Some globals where not properly initialized causing timeouts
> as data packets where not immediately acknowledged.
I don't see a scenario where these two variables will not be initialized.
Can you please elaborate ?
>
> Signed-off-by: Arjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com>
> ---
>  net/tftp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index 62a9648474..9d5fe2f2d9 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -912,6 +912,8 @@ void tftp_start_server(void)
>         tftp_block_size = TFTP_BLOCK_SIZE;
>         tftp_cur_block = 0;
>         tftp_our_port = WELL_KNOWN_PORT;
> +       tftp_windowsize = 1;
> +       tftp_next_ack = tftp_windowsize;
>
>  #ifdef CONFIG_TFTP_TSIZE
>         tftp_tsize = 0;
> --
> 2.25.1

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

* [PATCH] net: tftp: fix tftp server initialization
@ 2022-03-31  8:03 Arjan Minzinga Zijlstra
  2022-04-01 19:43 ` Ramon Fried
  2022-04-12 19:40 ` Ramon Fried
  0 siblings, 2 replies; 5+ messages in thread
From: Arjan Minzinga Zijlstra @ 2022-03-31  8:03 UTC (permalink / raw)
  To: u-boot; +Cc: joe.hershberger

Some globals where not properly initialized causing timeouts
as data packets where not immediately acknowledged.

Signed-off-by: Arjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com>
---
 net/tftp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/tftp.c b/net/tftp.c
index 62a9648474..9d5fe2f2d9 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -912,6 +912,8 @@ void tftp_start_server(void)
 	tftp_block_size = TFTP_BLOCK_SIZE;
 	tftp_cur_block = 0;
 	tftp_our_port = WELL_KNOWN_PORT;
+	tftp_windowsize = 1;
+	tftp_next_ack = tftp_windowsize;
 
 #ifdef CONFIG_TFTP_TSIZE
 	tftp_tsize = 0;
-- 
2.25.1

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

end of thread, other threads:[~2022-04-12 19:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 11:21 [PATCH] net: tftp: fix tftp server initialization Arjan Minzinga Zijlstra
2022-04-12 19:38 ` Ramon Fried
  -- strict thread matches above, loose matches on Subject: below --
2022-03-31  8:03 Arjan Minzinga Zijlstra
2022-04-01 19:43 ` Ramon Fried
2022-04-12 19:40 ` Ramon Fried

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.