gvanem / Watt-32

Watt-32 TCP/IP library and samples.
https://www.watt-32.net/
18 stars 8 forks source link

Only reply to ACK if we have more data to send #102

Closed jwt27 closed 7 months ago

jwt27 commented 7 months ago

fixes: #100

I re-ordered the logic a bit, hopefully this makes it easier to follow.

jwt27 commented 7 months ago

BTW, maybe receiving a PUSH bit is a good reason to do fast-ACK.

gvanem commented 7 months ago

BTW, maybe receiving a PUSH bit is a good reason to do fast-ACK.

Not sure what you mean here.

But most important; what does WireShark say now about Dup ACKS and how has the rate improved?

jwt27 commented 7 months ago

Dup ACKs are gone now, and transfer rate is about 1900 KB/s. This can be improved further if we set PUSH bit less often, I'm working on that now.

Linux seems to send a fast-ACK when it receives a segment with PUSH set. Otherwise it does delayed-ACK, so then we have fewer ACKs to process.

For the comment about "needing a better criteria for doing Fast-ACK", I think we can also copy this behavior.

gvanem commented 7 months ago

Merged and many thanks again.

jwt27 commented 7 months ago

Just noticed I introduced a sign-compare warning here, oops.