mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question regarding TCP behavior
@ 2008-05-29 15:29 Adayadil Thomas
  2008-05-29 16:56 ` David Schwartz
  0 siblings, 1 reply; 3+ messages in thread
From: Adayadil Thomas @ 2008-05-29 15:29 UTC (permalink / raw)
  To: linux-kernel

Greetings.

I have a question about how linux's TCP stack behaves.
I apologize if this is not the right place to ask this question and
please redirect me.

When a TCP end point (A) sends x bytes of data to the other end point (B),
does B immediately ACK the received bytes or will it do so only when the data
is passed to the upper layer ?


Thanks
Thomas

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

* RE: Question regarding TCP behavior
  2008-05-29 15:29 Question regarding TCP behavior Adayadil Thomas
@ 2008-05-29 16:56 ` David Schwartz
  2008-06-01 18:50   ` Jan Engelhardt
  0 siblings, 1 reply; 3+ messages in thread
From: David Schwartz @ 2008-05-29 16:56 UTC (permalink / raw)
  To: linux-kernel


> Greetings.
>
> I have a question about how linux's TCP stack behaves.
> I apologize if this is not the right place to ask this question and
> please redirect me.
>
> When a TCP end point (A) sends x bytes of data to the other end point (B),
> does B immediately ACK the received bytes or will it do so only
> when the data
> is passed to the upper layer ?
>
>
> Thanks
> Thomas

If the TCP connection was idle and there is no unacknowledged data in either
direction, the answer is neither.

Acknowledging the data immediately is wasteful. There's a very good chance
another packet is right behind this one and delaying the acknowledgement
would save a packet.

Waiting for upper layers is disastrous, it could result in the other end
timing out and retransmitting and would limit the end of slow start based on
user-space speeds.

Google "delayed ACK".
http://www.freesoft.org/CIE/RFC/1122/110.htm

DS



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

* RE: Question regarding TCP behavior
  2008-05-29 16:56 ` David Schwartz
@ 2008-06-01 18:50   ` Jan Engelhardt
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Engelhardt @ 2008-06-01 18:50 UTC (permalink / raw)
  To: David Schwartz; +Cc: linux-kernel


On Thursday 2008-05-29 18:56, David Schwartz wrote:
>> Greetings.
>>
>> I have a question about how linux's TCP stack behaves.
>> I apologize if this is not the right place to ask this question and
>> please redirect me.
>>
>> When a TCP end point (A) sends x bytes of data to the other end point (B),
>> does B immediately ACK the received bytes or will it do so only
>> when the data
>> is passed to the upper layer ?
>>
>>
>> Thanks
>> Thomas
>
>If the TCP connection was idle and there is no unacknowledged data in either
>direction, the answer is neither.
>
>Acknowledging the data immediately is wasteful.[...]

And for everything else, there is the PSH bit. (I assume?)

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

end of thread, other threads:[~2008-06-01 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 15:29 Question regarding TCP behavior Adayadil Thomas
2008-05-29 16:56 ` David Schwartz
2008-06-01 18:50   ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®