Re: Socket API send command packaging up data

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Socket API send command packaging up data

Sergio R. Caprile
What you see is the Naggle algorithm.
It is the old trade off, delay or throughput. If your application
requires throughput, you want it. If you do need short delay, it can
usually be minimized by some configuration function/option.
The RAW API lets you tweak mostly at will, but the interface is not as
friendly as sockets and definitely not standard.
In all cases, the amount of bytes delivered at the other end is not
necessarily related to your calls to the API; though it can be tamed by
proper config and/or calling.
There are many threads in the list on this very subject, you can search
for some or wait for one of the gurus to give you some clues. For the
socket stuff, it is mostly standard.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Socket API send command packaging up data

goldsimon@gmx.de


Am 31. Juli 2018 14:34:14 MESZ schrieb "Sergio R. Caprile" <[hidden email]>:
>What you see is the Naggle algorithm.

I thought so, too, but if he is seeing 20 seconds delay, it's not Nagle but some bug.

In fact, nagle should only hold off sending data if there is already unacked data under way. If unsent and unacked are empty, I'd expect to see the data immediately. Unless I remember wrong, of course...

Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Socket API send command packaging up data

Sergio R. Caprile
In reply to this post by Sergio R. Caprile
Completely missed the "20 second" part.
You don't remember wrong, and you know it ;^)

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Socket API send command packaging up data

Mike Danby
When the test program is run for the first 3-5 seconds the each send call will result is the string (approx. 15 bytes) being transmitted to the client in separate frames. After that (even though the calls to send continue at a rate of 1Hz) the strings start to get packaged up into single frames. The number of strings in the packaged frames grows on a few iterations to be around 20 -25 (frames around 300 bytes).

I also see  the server respond to ARP requests, however the frame is 1514 bytes.  The data in the ARP request is correct but Wireshark notes the "Ethernet Frame Check Sequence Incorrect", I assume (probably incorrectly) because the frame size incorrect even though data is good.

-----Original Message-----
From: lwip-users <lwip-users-bounces+mike.danby=[hidden email]> On Behalf Of Sergio R. Caprile
Sent: 31 July 2018 16:38
To: [hidden email]
Subject: Re: [lwip-users] Socket API send command packaging up data

Completely missed the "20 second" part.
You don't remember wrong, and you know it ;^)

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Socket API send command packaging up data

goldsimon@gmx.de
This sounds even more like a driver issue.

Am 1. August 2018 10:45:26 MESZ schrieb Mike Danby <[hidden email]>:
When the test program is run for the first 3-5 seconds the each send call will result is the string (approx. 15 bytes) being transmitted to the client in separate frames. After that (even though the calls to send continue at a rate of 1Hz) the strings start to get packaged up into single frames. The number of strings in the packaged frames grows on a few iterations to be around 20 -25 (frames around 300 bytes).

I also see the server respond to ARP requests, however the frame is 1514 bytes. The data in the ARP request is correct but Wireshark notes the "Ethernet Frame Check Sequence Incorrect", I assume (probably incorrectly) because the frame size incorrect even though data is good.

-----Original Message-----
From: lwip-users <lwip-users-bounces+mike.danby=[hidden email]> On Behalf Of Sergio R. Caprile
Sent: 31 July 2018 16:38
To: [hidden email]
Subject: Re: [lwip-users] Socket API send command packaging up data

Completely missed the "20 second" part.
You don't remember wrong, and you know it ;^)



lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users



lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Socket API send command packaging up data

Mike Danby

That’s were ill start then, I have attached a Wireshark trace if you can gleam any more information form it.

 

Thanks.

 

From: lwip-users <lwip-users-bounces+mike.danby=[hidden email]> On Behalf Of goldsimon
Sent: 01 August 2018 10:02
To: Mailing list for lwIP users <[hidden email]>
Subject: Re: [lwip-users] Socket API send command packaging up data

 

This sounds even more like a driver issue.

Am 1. August 2018 10:45:26 MESZ schrieb Mike Danby <[hidden email]>:

When the test program is run for the first 3-5 seconds the each send call will result is the string (approx. 15 bytes) being transmitted to the client in separate frames. After that (even though the calls to send continue at a rate of 1Hz) the strings start to get packaged up into single frames. The number of strings in the packaged frames grows on a few iterations to be around 20 -25 (frames around 300 bytes).

I also see  the server respond to ARP requests, however the frame is 1514 bytes.  The data in the ARP request is correct but Wireshark notes the "Ethernet Frame Check Sequence Incorrect", I assume (probably incorrectly) because the frame size incorrect even though data is good.

-----Original Message-----
From: lwip-users <[hidden email]> On Behalf Of Sergio R. Caprile
Sent: 31 July 2018 16:38
To: [hidden email]
Subject: Re: [lwip-users] Socket API send command packaging up data

Completely missed the "20 second" part.
You don't remember wrong, and you know it ;^)


lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

data_slow.pcapng (19K) Download Attachment