Re: inconsistent wget behavior

2024-03-22 Thread Fabio Estevam
Hi Paul,

On Sun, Feb 11, 2024 at 4:42 PM Paul Liu  wrote:
>
> Hi Fabio,
>
> I'm on vacation now (Chinese new year). I hope I'll find some time to revive 
> my imx8 board.
> I've tried sandbox and qemu. Both of them are not reproducible. I'm wondering 
> if it could be some packet loss that causes the issue. Because sandbox and 
> qemu there won't be any missing packets because of loopback devices.

Have you had a chance to reproduce the issue on your imx8mm board?


Re: inconsistent wget behavior

2024-02-11 Thread Paul Liu
Hi Fabio,

I'm on vacation now (Chinese new year). I hope I'll find some time to
revive my imx8 board.
I've tried sandbox and qemu. Both of them are not reproducible. I'm
wondering if it could be some packet loss that causes the issue. Because
sandbox and qemu there won't be any missing packets because of loopback
devices.

Yours,
Paul



On Thu, 8 Feb 2024 at 02:00, Fabio Estevam  wrote:

> Hi Paul,
>
> On Wed, Jan 10, 2024 at 9:20 AM Fabio Estevam  wrote:
>
> > One colleague from you at Linaro was able to reproduce the bug:
> >
> >
> https://lore.kernel.org/u-boot/cadq0-x_cj1ecn67u3sefcz-jm4obsymzka+jazrca3ekq84...@mail.gmail.com/
> >
> > It is not specific to i.MX.
>
> Have you had a chance to look into this wget problem?
>


Re: inconsistent wget behavior

2024-02-07 Thread Fabio Estevam
Hi Paul,

On Wed, Jan 10, 2024 at 9:20 AM Fabio Estevam  wrote:

> One colleague from you at Linaro was able to reproduce the bug:
>
> https://lore.kernel.org/u-boot/cadq0-x_cj1ecn67u3sefcz-jm4obsymzka+jazrca3ekq84...@mail.gmail.com/
>
> It is not specific to i.MX.

Have you had a chance to look into this wget problem?


Re: inconsistent wget behavior

2024-01-10 Thread Fabio Estevam
Hi Paul,

On Fri, Jan 5, 2024 at 4:19 PM Fabio Estevam  wrote:

> > I tried to investigate this by U-boot sandbox. But it seems to me that I 
> > cannot reproduce this issue.
> > I put a file on localhost apache server and tried to download it from 
> > localhost.
> > I might need a more persistent way to reproduce this bug.
>
> Do you still have access to the imx8mm-cl-iot-gate board?
>
> I am sure you would be able to reproduce it with it.

One colleague from you at Linaro was able to reproduce the bug:

https://lore.kernel.org/u-boot/cadq0-x_cj1ecn67u3sefcz-jm4obsymzka+jazrca3ekq84...@mail.gmail.com/

It is not specific to i.MX.

Thanks


Re: inconsistent wget behavior

2024-01-07 Thread Fabio Estevam
Hi Michael,

On Sun, Jan 7, 2024 at 1:36 PM Michael Nazzareno Trimarchi
 wrote:

> I have sent but not sure about it, just compile for now ;)

It didn't work:

u-boot=> wget 192.168.0.16:/test
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
Packets received 298384, Transfer Successful
Bytes transferred = 1448 (5a8 hex)
u-boot=> wget 192.168.0.16:/Image
HTTP/1.0 200 

Re: inconsistent wget behavior

2024-01-07 Thread Michael Nazzareno Trimarchi
Hi Fabio

On Sun, Jan 7, 2024 at 5:19 PM Michael Nazzareno Trimarchi
 wrote:
>
> Hi
>
> Il dom 7 gen 2024, 17:08 Fabio Estevam  ha scritto:
>>
>> Hi Michael,
>>
>> On Sat, Jan 6, 2024 at 5:49 AM Michael Nazzareno Trimarchi
>>  wrote:
>> >
>> > Hi
>> >
>> > Is this code correct?
>> >
>> > if (tcp_seq_num >= initial_data_seq_num &&
>> > store_block(pkt, tcp_seq_num - initial_data_seq_num,
>> > len) != 0) {
>> > wget_fail("wget: store error\n",
>> >   tcp_seq_num, tcp_ack_num, action);
>> > return;
>> > }
>> >
>> > Can not be seq_num wrap around? Another point seems that is not
>> > guarantee packet reassembly
>>
>> If you submit a patch, I will be glad to test it.
>>
>> Cheers
>
>
> I have already wrote something but I can not test. Will send tonight. My 
> feeling is that sometime the initial sequence number of TCP ip is next to 
> wrap around but not sure.
>

I have sent but not sure about it, just compile for now ;)

> Michael



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
mich...@amarulasolutions.com
__

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
i...@amarulasolutions.com
www.amarulasolutions.com


Re: inconsistent wget behavior

2024-01-07 Thread Michael Nazzareno Trimarchi
Hi

Il dom 7 gen 2024, 17:08 Fabio Estevam  ha scritto:

> Hi Michael,
>
> On Sat, Jan 6, 2024 at 5:49 AM Michael Nazzareno Trimarchi
>  wrote:
> >
> > Hi
> >
> > Is this code correct?
> >
> > if (tcp_seq_num >= initial_data_seq_num &&
> > store_block(pkt, tcp_seq_num - initial_data_seq_num,
> > len) != 0) {
> > wget_fail("wget: store error\n",
> >   tcp_seq_num, tcp_ack_num, action);
> > return;
> > }
> >
> > Can not be seq_num wrap around? Another point seems that is not
> > guarantee packet reassembly
>
> If you submit a patch, I will be glad to test it.
>
> Cheers
>

I have already wrote something but I can not test. Will send tonight. My
feeling is that sometime the initial sequence number of TCP ip is next to
wrap around but not sure.

Michael

>


Re: inconsistent wget behavior

2024-01-07 Thread Fabio Estevam
Hi Michael,

On Sat, Jan 6, 2024 at 5:49 AM Michael Nazzareno Trimarchi
 wrote:
>
> Hi
>
> Is this code correct?
>
> if (tcp_seq_num >= initial_data_seq_num &&
> store_block(pkt, tcp_seq_num - initial_data_seq_num,
> len) != 0) {
> wget_fail("wget: store error\n",
>   tcp_seq_num, tcp_ack_num, action);
> return;
> }
>
> Can not be seq_num wrap around? Another point seems that is not
> guarantee packet reassembly

If you submit a patch, I will be glad to test it.

Cheers


Re: inconsistent wget behavior

2024-01-06 Thread Michael Nazzareno Trimarchi
Hi

On Sat, Jan 6, 2024 at 9:49 AM Michael Nazzareno Trimarchi
 wrote:
>
> Hi
>
> Is this code correct?
>
> if (tcp_seq_num >= initial_data_seq_num &&
> store_block(pkt, tcp_seq_num - initial_data_seq_num,
> len) != 0) {
> wget_fail("wget: store error\n",
>   tcp_seq_num, tcp_ack_num, action);
> return;
> }
>
> Can not be seq_num wrap around? Another point seems that is not
> guarantee packet reassembly
>

And what happen if you are going to generate out of sequence packet
and with large seq_number on purpose?

I think that lwip has much more sense

Michael

> Michael
>
> On Fri, Jan 5, 2024 at 8:53 PM Fabio Estevam  wrote:
> >
> > On Fri, Jan 5, 2024 at 4:49 PM Michael Nazzareno Trimarchi
> >  wrote:
> >
> > > I was thinking that was lwip integration
> >
> > That's a different issue.
> >
> > If you want to test lwip integration, you can try it from:
> > https://github.com/muvarov/u-boot/tree/master_lwip_test_v10
>
>
>
> --
> Michael Nazzareno Trimarchi
> Co-Founder & Chief Executive Officer
> M. +39 347 913 2170
> mich...@amarulasolutions.com
> __
>
> Amarula Solutions BV
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> T. +31 (0)85 111 9172
> i...@amarulasolutions.com
> www.amarulasolutions.com



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
mich...@amarulasolutions.com
__

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
i...@amarulasolutions.com
www.amarulasolutions.com


Re: inconsistent wget behavior

2024-01-06 Thread Michael Nazzareno Trimarchi
Hi

Is this code correct?

if (tcp_seq_num >= initial_data_seq_num &&
store_block(pkt, tcp_seq_num - initial_data_seq_num,
len) != 0) {
wget_fail("wget: store error\n",
  tcp_seq_num, tcp_ack_num, action);
return;
}

Can not be seq_num wrap around? Another point seems that is not
guarantee packet reassembly

Michael

On Fri, Jan 5, 2024 at 8:53 PM Fabio Estevam  wrote:
>
> On Fri, Jan 5, 2024 at 4:49 PM Michael Nazzareno Trimarchi
>  wrote:
>
> > I was thinking that was lwip integration
>
> That's a different issue.
>
> If you want to test lwip integration, you can try it from:
> https://github.com/muvarov/u-boot/tree/master_lwip_test_v10



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
mich...@amarulasolutions.com
__

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
i...@amarulasolutions.com
www.amarulasolutions.com


Re: inconsistent wget behavior

2024-01-05 Thread Fabio Estevam
On Fri, Jan 5, 2024 at 4:49 PM Michael Nazzareno Trimarchi
 wrote:

> I was thinking that was lwip integration

That's a different issue.

If you want to test lwip integration, you can try it from:
https://github.com/muvarov/u-boot/tree/master_lwip_test_v10


Re: inconsistent wget behavior

2024-01-05 Thread Michael Nazzareno Trimarchi
Hi Fabio

On Fri, Jan 5, 2024 at 8:32 PM Fabio Estevam  wrote:
>
> Hi Michael,
>
> On Fri, Jan 5, 2024 at 4:12 PM Michael Nazzareno Trimarchi
>  wrote:
>
> > Can you reproduce with dcache off?
>
> I haven't tried it.
>
> > Where are the patches to test?
>
> The wget issue can be reproduced with U-Boot master.
>
> No need for extra patches. Please see the first message of this thread
> where Tim explains how to reproduce it.

I was thinking that was lwip integration

Michael

-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
mich...@amarulasolutions.com
__

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
i...@amarulasolutions.com
www.amarulasolutions.com


Re: inconsistent wget behavior

2024-01-05 Thread Fabio Estevam
Hi Michael,

On Fri, Jan 5, 2024 at 4:12 PM Michael Nazzareno Trimarchi
 wrote:

> Can you reproduce with dcache off?

I haven't tried it.

> Where are the patches to test?

The wget issue can be reproduced with U-Boot master.

No need for extra patches. Please see the first message of this thread
where Tim explains how to reproduce it.


Re: inconsistent wget behavior

2024-01-05 Thread Fabio Estevam
Hi Paul,

On Fri, Jan 5, 2024 at 3:57 PM Paul Liu  wrote:
>
> Hi Fabio,
>
> I tried to investigate this by U-boot sandbox. But it seems to me that I 
> cannot reproduce this issue.
> I put a file on localhost apache server and tried to download it from 
> localhost.
> I might need a more persistent way to reproduce this bug.

Do you still have access to the imx8mm-cl-iot-gate board?

I am sure you would be able to reproduce it with it.

Thanks


Re: inconsistent wget behavior

2024-01-05 Thread Michael Nazzareno Trimarchi
Hi

On Fri, Jan 5, 2024 at 7:57 PM Paul Liu  wrote:
>
> Hi Fabio,
>
> I tried to investigate this by U-boot sandbox. But it seems to me that I
> cannot reproduce this issue.
> I put a file on localhost apache server and tried to download it from
> localhost.
> I might need a more persistent way to reproduce this bug.
>

Can you reproduce with dcache off?

Where are the patches to test?

Michael


Re: inconsistent wget behavior

2024-01-05 Thread Paul Liu
Hi Fabio,

I tried to investigate this by U-boot sandbox. But it seems to me that I
cannot reproduce this issue.
I put a file on localhost apache server and tried to download it from
localhost.
I might need a more persistent way to reproduce this bug.

Yours,
Paul


On Sat, 6 Jan 2024 at 00:17, Fabio Estevam  wrote:

> Hi Paul,
>
> On Thu, Nov 16, 2023 at 6:41 AM Paul Liu  wrote:
> >
> > Hi Fabio,
> >
> > Yes. I'll look into this problem.
>
> Did you have a chance to investigate this problem?
>
> Thanks
>


Re: inconsistent wget behavior

2024-01-05 Thread Fabio Estevam
Hi Paul,

On Thu, Nov 16, 2023 at 6:41 AM Paul Liu  wrote:
>
> Hi Fabio,
>
> Yes. I'll look into this problem.

Did you have a chance to investigate this problem?

Thanks


Re: inconsistent wget behavior

2023-11-16 Thread Paul Liu
Hi Fabio,

Yes. I'll look into this problem.

Yours,
Paul


On Thu, 16 Nov 2023 at 08:34, Fabio Estevam  wrote:

> Hi Paul,
>
> On Wed, Nov 8, 2023 at 10:24 PM Fabio Estevam  wrote:
>
> > I was not able to see a failure when using "tftp" to transfer the same
> > 420MB file.
> >
> > The number of bytes transferred and md5sum always match, so this is a
> wget bug.
>
> There was another user who confirmed the same issue:
>
>
> https://lore.kernel.org/u-boot/cadq0-x_cj1ecn67u3sefcz-jm4obsymzka+jazrca3ekq84...@mail.gmail.com/
>
> Could you please take a look at this bug?
>
> wget is not reliable at the moment.
>
> Thanks
>


Re: inconsistent wget behavior

2023-11-15 Thread Fabio Estevam
Hi Paul,

On Wed, Nov 8, 2023 at 10:24 PM Fabio Estevam  wrote:

> I was not able to see a failure when using "tftp" to transfer the same
> 420MB file.
>
> The number of bytes transferred and md5sum always match, so this is a wget 
> bug.

There was another user who confirmed the same issue:

https://lore.kernel.org/u-boot/cadq0-x_cj1ecn67u3sefcz-jm4obsymzka+jazrca3ekq84...@mail.gmail.com/

Could you please take a look at this bug?

wget is not reliable at the moment.

Thanks


Re: inconsistent wget behavior

2023-11-08 Thread Fabio Estevam
Hi Tom,

On Wed, Nov 8, 2023 at 9:17 PM Tom Rini  wrote:

> Interesting.  What if you take wget out of the equation and use "tftp"
> to grab a large file with a known checksum, repeatedly (note that "rhash
> -C" will give a crc32 in Linux so you can confirm the correct value and
> loop a get, crc32, compare, repeat loop with a little work) ? I ask
> because I was reminded today that for me at least, the RPi ethernet
> isn't reliable in U-Boot for me if you stress it too hard. So I'd like
> to try see if this is "wget bug" or "network driver/related bug".

I was not able to see a failure when using "tftp" to transfer the same
420MB file.

The number of bytes transferred and md5sum always match, so this is a wget bug.


Re: inconsistent wget behavior

2023-11-08 Thread Tom Rini
On Wed, Nov 08, 2023 at 09:00:23PM -0300, Fabio Estevam wrote:

> [Adding Tom and Marek]
> 
> On Wed, Nov 8, 2023 at 7:22 PM Tim Harvey  wrote:
> >
> > Greetings,
> >
> > I've recently given wget/tcp a try and find the results inconsistent.
> >
> > Transferring the same file 15 times in a row will eventually give me
> > an incomplete transfer with packet/byte count wrong but showing
> > 'Transfer Successful'.
> >
> > Here is current master on an imx8mp-venice-gw74xx board using IMX8MP
> > EQOS enet dev:
> >
> 
> > u-boot=> time wget $loadaddr
> > /tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
> > $filesize
> > HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | |
> > Packets received 64368, Transfer Successful
> > Bytes transferred = 93198937 (58e1a59 hex)
> >
> > time: 3.103 seconds
> > md5 for 4820 ... 4dae1a58 ==> 69bedfe899148c43c09a98ac950dd0ed
> 
> 
> > u-boot=> time wget $loadaddr
> > /tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
> > $filesize
> > HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | | | | | | | | | | | | | | | | | | | |
> >  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> > | | | | | |
> > Packets received 64368, Transfer Successful
> > Bytes transferred = 26984682 (19bc0ea hex)
> >
> > time: 3.011 seconds
> > md5 for 4820 ... 49bbc0e9 ==> c9978ff116605a7729a1cb14ef51fc20
> >
> > Anyone else seeing this?
> 
> Yes, I am seeing the same behavior on an imx8mn board using the FEC driver.
> 
> I am transferring a 412MB file. Doing the wget transfers several times
> in a row, I also see the incorrect number of bytes transferred:

Interesting.  What if you take wget out of the equation and use "tftp"
to grab a large file with a known checksum, repeatedly (note that "rhash
-C" will give a crc32 in Linux so you can confirm the correct value and
loop a get, crc32, compare, repeat loop with a little work) ? I ask
because I was reminded today that for me at least, the RPi ethernet
isn't reliable in U-Boot for me if you stress it too hard. So I'd like
to try see if this is "wget bug" or "network driver/related bug".

-- 
Tom


signature.asc
Description: PGP signature


Re: inconsistent wget behavior

2023-11-08 Thread Fabio Estevam
[Adding Tom and Marek]

On Wed, Nov 8, 2023 at 7:22 PM Tim Harvey  wrote:
>
> Greetings,
>
> I've recently given wget/tcp a try and find the results inconsistent.
>
> Transferring the same file 15 times in a row will eventually give me
> an incomplete transfer with packet/byte count wrong but showing
> 'Transfer Successful'.
>
> Here is current master on an imx8mp-venice-gw74xx board using IMX8MP
> EQOS enet dev:
>

> u-boot=> time wget $loadaddr
> /tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
> $filesize
> HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | |
> Packets received 64368, Transfer Successful
> Bytes transferred = 93198937 (58e1a59 hex)
>
> time: 3.103 seconds
> md5 for 4820 ... 4dae1a58 ==> 69bedfe899148c43c09a98ac950dd0ed


> u-boot=> time wget $loadaddr
> /tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
> $filesize
> HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | | | | | | | | | | | | | | | | | | | |
>  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
> | | | | | |
> Packets received 64368, Transfer Successful
> Bytes transferred = 26984682 (19bc0ea hex)
>
> time: 3.011 seconds
> md5 for 4820 ... 49bbc0e9 ==> c9978ff116605a7729a1cb14ef51fc20
>
> Anyone else seeing this?

Yes, I am seeing the same behavior on an imx8mn board using the FEC driver.

I am transferring a 412MB file. Doing the wget transfers several times
in a row, I also see the incorrect number of bytes transferred:

u-boot=> wget test
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 

inconsistent wget behavior

2023-11-08 Thread Tim Harvey
Greetings,

I've recently given wget/tcp a try and find the results inconsistent.

Transferring the same file 15 times in a row will eventually give me
an incomplete transfer with packet/byte count wrong but showing
'Transfer Successful'.

Here is current master on an imx8mp-venice-gw74xx board using IMX8MP
EQOS enet dev:

u-boot=> time wget $loadaddr
/tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
$filesize
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | |
Packets received 64368, Transfer Successful
Bytes transferred = 93198937 (58e1a59 hex)

time: 3.099 seconds
md5 for 4820 ... 4dae1a58 ==> 69bedfe899148c43c09a98ac950dd0ed
u-boot=> time wget $loadaddr
/tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
$filesize
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | |
Packets received 64368, Transfer Successful
Bytes transferred = 93198937 (58e1a59 hex)

time: 3.103 seconds
md5 for 4820 ... 4dae1a58 ==> 69bedfe899148c43c09a98ac950dd0ed
u-boot=> time wget $loadaddr
/tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
$filesize
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | |
Packets received 64368, Transfer Successful
Bytes transferred = 93198937 (58e1a59 hex)

time: 3.091 seconds
md5 for 4820 ... 4dae1a58 ==> 69bedfe899148c43c09a98ac950dd0ed
u-boot=> time wget $loadaddr
/tftpboot/venice/core-image-minimal.ext4.gz && md5sum $loadaddr
$filesize
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | |