All of lore.kernel.org
 help / color / mirror / Atom feed
* Kernel 2.4.20 TCP persist mode
@ 2005-10-23 17:34 Ning Jiang
  2005-10-23 18:37 ` Baruch Even
  0 siblings, 1 reply; 2+ messages in thread
From: Ning Jiang @ 2005-10-23 17:34 UTC (permalink / raw)
  To: linux-kernel

Hi, all,

I'm testing some programs on Linux 2.4.20. My programs The programs work 
as follows:

1. A TCP Server is listening on a machine.
2. A TCP Client connects the server.
3. The TCP server transmits 3000 packets to the client.
4. A netfilter hook is registered on the same machine as the TCP server. 
The hook inspects the incoming ACKs. For some ACK, the hook function 
changes the acknowledge window size to 0. Suppose the acknowledgement 
sequence of the ACK is N, the hook function sets it to a value N' (N' < 
N).  The purpose is to switch TCP into persist mode, where TCP ceases 
transmitting data packets to the receiver, and periodically probe the 
reciever until an ACK with non zero ack window is received.

Our observation is: when we set N'<N, the 2.4.20 kernel didn't switch into 
persist mode! It tried to retransmit the previous packet. When we set 
N'=N, it did switch into persist mode. It seems that TCP of 2.4.20 will 
only switch into persist mode when the whole window of segments are 
successfully acknowledged. Otherwise, it will simply retransmit the 
segments.

Anyone knows this problem? Any idea on how to switch TCP into persist mode 
without acknowledging the whole window boundary?

Thanks!!

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

* Re: Kernel 2.4.20 TCP persist mode
  2005-10-23 17:34 Kernel 2.4.20 TCP persist mode Ning Jiang
@ 2005-10-23 18:37 ` Baruch Even
  0 siblings, 0 replies; 2+ messages in thread
From: Baruch Even @ 2005-10-23 18:37 UTC (permalink / raw)
  To: Ning Jiang; +Cc: linux-kernel

Ning Jiang wrote:
> Hi, all,
> 
> I'm testing some programs on Linux 2.4.20. My programs The programs work
> as follows:
> 
> 1. A TCP Server is listening on a machine.
> 2. A TCP Client connects the server.
> 3. The TCP server transmits 3000 packets to the client.
> 4. A netfilter hook is registered on the same machine as the TCP server.
> The hook inspects the incoming ACKs. For some ACK, the hook function
> changes the acknowledge window size to 0. Suppose the acknowledgement
> sequence of the ACK is N, the hook function sets it to a value N' (N' <
> N).  The purpose is to switch TCP into persist mode, where TCP ceases
> transmitting data packets to the receiver, and periodically probe the
> reciever until an ACK with non zero ack window is received.
> 
> Our observation is: when we set N'<N, the 2.4.20 kernel didn't switch
> into persist mode! It tried to retransmit the previous packet. When we
> set N'=N, it did switch into persist mode. It seems that TCP of 2.4.20
> will only switch into persist mode when the whole window of segments are
> successfully acknowledged. Otherwise, it will simply retransmit the
> segments.
> 
> Anyone knows this problem? Any idea on how to switch TCP into persist
> mode without acknowledging the whole window boundary?

It sounds like this is the correct behaviour. The window obviously was
open at the time the packets were sent and if we get now a window of
zero it just means that the window is closed now and we can't send
anything new. If there are packets that weren't acknowledged we should
retransmit them.

Baruch

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

end of thread, other threads:[~2005-10-23 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-23 17:34 Kernel 2.4.20 TCP persist mode Ning Jiang
2005-10-23 18:37 ` Baruch Even

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.