<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/ipv4/tcp_timer.c, branch v3.12.43</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>tcp: refactor F-RTO</title>
<updated>2013-03-21T15:47:50+00:00</updated>
<author>
<name>Yuchung Cheng</name>
<email>ycheng@google.com</email>
</author>
<published>2013-03-20T13:32:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b44190dc114c1720b34975b5bfc65aece112ced'/>
<id>9b44190dc114c1720b34975b5bfc65aece112ced</id>
<content type='text'>
The patch series refactor the F-RTO feature (RFC4138/5682).

This is to simplify the loss recovery processing. Existing F-RTO
was developed during the experimental stage (RFC4138) and has
many experimental features.  It takes a separate code path from
the traditional timeout processing by overloading CA_Disorder
instead of using CA_Loss state. This complicates CA_Disorder state
handling because it's also used for handling dubious ACKs and undos.
While the algorithm in the RFC does not change the congestion control,
the implementation intercepts congestion control in various places
(e.g., frto_cwnd in tcp_ack()).

The new code implements newer F-RTO RFC5682 using CA_Loss processing
path.  F-RTO becomes a small extension in the timeout processing
and interfaces with congestion control and Eifel undo modules.
It lets congestion control (module) determines how many to send
independently.  F-RTO only chooses what to send in order to detect
spurious retranmission. If timeout is found spurious it invokes
existing Eifel undo algorithms like DSACK or TCP timestamp based
detection.

The first patch removes all F-RTO code except the sysctl_tcp_frto is
left for the new implementation.  Since CA_EVENT_FRTO is removed, TCP
westwood now computes ssthresh on regular timeout CA_EVENT_LOSS event.

Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The patch series refactor the F-RTO feature (RFC4138/5682).

This is to simplify the loss recovery processing. Existing F-RTO
was developed during the experimental stage (RFC4138) and has
many experimental features.  It takes a separate code path from
the traditional timeout processing by overloading CA_Disorder
instead of using CA_Loss state. This complicates CA_Disorder state
handling because it's also used for handling dubious ACKs and undos.
While the algorithm in the RFC does not change the congestion control,
the implementation intercepts congestion control in various places
(e.g., frto_cwnd in tcp_ack()).

The new code implements newer F-RTO RFC5682 using CA_Loss processing
path.  F-RTO becomes a small extension in the timeout processing
and interfaces with congestion control and Eifel undo modules.
It lets congestion control (module) determines how many to send
independently.  F-RTO only chooses what to send in order to detect
spurious retranmission. If timeout is found spurious it invokes
existing Eifel undo algorithms like DSACK or TCP timestamp based
detection.

The first patch removes all F-RTO code except the sysctl_tcp_frto is
left for the new implementation.  Since CA_EVENT_FRTO is removed, TCP
westwood now computes ssthresh on regular timeout CA_EVENT_LOSS event.

Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: TLP loss detection.</title>
<updated>2013-03-12T12:30:34+00:00</updated>
<author>
<name>Nandita Dukkipati</name>
<email>nanditad@google.com</email>
</author>
<published>2013-03-11T10:00:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b717a8d245075ffb8e95a2dfb4ee97ce4747457'/>
<id>9b717a8d245075ffb8e95a2dfb4ee97ce4747457</id>
<content type='text'>
This is the second of the TLP patch series; it augments the basic TLP
algorithm with a loss detection scheme.

This patch implements a mechanism for loss detection when a Tail
loss probe retransmission plugs a hole thereby masking packet loss
from the sender. The loss detection algorithm relies on counting
TLP dupacks as outlined in Sec. 3 of:
http://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01

The basic idea is: Sender keeps track of TLP "episode" upon
retransmission of a TLP packet. An episode ends when the sender receives
an ACK above the SND.NXT (tracked by tlp_high_seq) at the time of the
episode. We want to make sure that before the episode ends the sender
receives a "TLP dupack", indicating that the TLP retransmission was
unnecessary, so there was no loss/hole that needed plugging. If the
sender gets no TLP dupack before the end of the episode, then it reduces
ssthresh and the congestion window, because the TLP packet arriving at
the receiver probably plugged a hole.

Signed-off-by: Nandita Dukkipati &lt;nanditad@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the second of the TLP patch series; it augments the basic TLP
algorithm with a loss detection scheme.

This patch implements a mechanism for loss detection when a Tail
loss probe retransmission plugs a hole thereby masking packet loss
from the sender. The loss detection algorithm relies on counting
TLP dupacks as outlined in Sec. 3 of:
http://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01

The basic idea is: Sender keeps track of TLP "episode" upon
retransmission of a TLP packet. An episode ends when the sender receives
an ACK above the SND.NXT (tracked by tlp_high_seq) at the time of the
episode. We want to make sure that before the episode ends the sender
receives a "TLP dupack", indicating that the TLP retransmission was
unnecessary, so there was no loss/hole that needed plugging. If the
sender gets no TLP dupack before the end of the episode, then it reduces
ssthresh and the congestion window, because the TLP packet arriving at
the receiver probably plugged a hole.

Signed-off-by: Nandita Dukkipati &lt;nanditad@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: Tail loss probe (TLP)</title>
<updated>2013-03-12T12:30:34+00:00</updated>
<author>
<name>Nandita Dukkipati</name>
<email>nanditad@google.com</email>
</author>
<published>2013-03-11T10:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6ba8a3b19e764b6a65e4030ab0999be50c291e6c'/>
<id>6ba8a3b19e764b6a65e4030ab0999be50c291e6c</id>
<content type='text'>
This patch series implement the Tail loss probe (TLP) algorithm described
in http://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01. The
first patch implements the basic algorithm.

TLP's goal is to reduce tail latency of short transactions. It achieves
this by converting retransmission timeouts (RTOs) occuring due
to tail losses (losses at end of transactions) into fast recovery.
TLP transmits one packet in two round-trips when a connection is in
Open state and isn't receiving any ACKs. The transmitted packet, aka
loss probe, can be either new or a retransmission. When there is tail
loss, the ACK from a loss probe triggers FACK/early-retransmit based
fast recovery, thus avoiding a costly RTO. In the absence of loss,
there is no change in the connection state.

PTO stands for probe timeout. It is a timer event indicating
that an ACK is overdue and triggers a loss probe packet. The PTO value
is set to max(2*SRTT, 10ms) and is adjusted to account for delayed
ACK timer when there is only one oustanding packet.

TLP Algorithm

On transmission of new data in Open state:
  -&gt; packets_out &gt; 1: schedule PTO in max(2*SRTT, 10ms).
  -&gt; packets_out == 1: schedule PTO in max(2*RTT, 1.5*RTT + 200ms)
  -&gt; PTO = min(PTO, RTO)

Conditions for scheduling PTO:
  -&gt; Connection is in Open state.
  -&gt; Connection is either cwnd limited or no new data to send.
  -&gt; Number of probes per tail loss episode is limited to one.
  -&gt; Connection is SACK enabled.

When PTO fires:
  new_segment_exists:
    -&gt; transmit new segment.
    -&gt; packets_out++. cwnd remains same.

  no_new_packet:
    -&gt; retransmit the last segment.
       Its ACK triggers FACK or early retransmit based recovery.

ACK path:
  -&gt; rearm RTO at start of ACK processing.
  -&gt; reschedule PTO if need be.

In addition, the patch includes a small variation to the Early Retransmit
(ER) algorithm, such that ER and TLP together can in principle recover any
N-degree of tail loss through fast recovery. TLP is controlled by the same
sysctl as ER, tcp_early_retrans sysctl.
tcp_early_retrans==0; disables TLP and ER.
		 ==1; enables RFC5827 ER.
		 ==2; delayed ER.
		 ==3; TLP and delayed ER. [DEFAULT]
		 ==4; TLP only.

The TLP patch series have been extensively tested on Google Web servers.
It is most effective for short Web trasactions, where it reduced RTOs by 15%
and improved HTTP response time (average by 6%, 99th percentile by 10%).
The transmitted probes account for &lt;0.5% of the overall transmissions.

Signed-off-by: Nandita Dukkipati &lt;nanditad@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch series implement the Tail loss probe (TLP) algorithm described
in http://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01. The
first patch implements the basic algorithm.

TLP's goal is to reduce tail latency of short transactions. It achieves
this by converting retransmission timeouts (RTOs) occuring due
to tail losses (losses at end of transactions) into fast recovery.
TLP transmits one packet in two round-trips when a connection is in
Open state and isn't receiving any ACKs. The transmitted packet, aka
loss probe, can be either new or a retransmission. When there is tail
loss, the ACK from a loss probe triggers FACK/early-retransmit based
fast recovery, thus avoiding a costly RTO. In the absence of loss,
there is no change in the connection state.

PTO stands for probe timeout. It is a timer event indicating
that an ACK is overdue and triggers a loss probe packet. The PTO value
is set to max(2*SRTT, 10ms) and is adjusted to account for delayed
ACK timer when there is only one oustanding packet.

TLP Algorithm

On transmission of new data in Open state:
  -&gt; packets_out &gt; 1: schedule PTO in max(2*SRTT, 10ms).
  -&gt; packets_out == 1: schedule PTO in max(2*RTT, 1.5*RTT + 200ms)
  -&gt; PTO = min(PTO, RTO)

Conditions for scheduling PTO:
  -&gt; Connection is in Open state.
  -&gt; Connection is either cwnd limited or no new data to send.
  -&gt; Number of probes per tail loss episode is limited to one.
  -&gt; Connection is SACK enabled.

When PTO fires:
  new_segment_exists:
    -&gt; transmit new segment.
    -&gt; packets_out++. cwnd remains same.

  no_new_packet:
    -&gt; retransmit the last segment.
       Its ACK triggers FACK or early retransmit based recovery.

ACK path:
  -&gt; rearm RTO at start of ACK processing.
  -&gt; reschedule PTO if need be.

In addition, the patch includes a small variation to the Early Retransmit
(ER) algorithm, such that ER and TLP together can in principle recover any
N-degree of tail loss through fast recovery. TLP is controlled by the same
sysctl as ER, tcp_early_retrans sysctl.
tcp_early_retrans==0; disables TLP and ER.
		 ==1; enables RFC5827 ER.
		 ==2; delayed ER.
		 ==3; TLP and delayed ER. [DEFAULT]
		 ==4; TLP only.

The TLP patch series have been extensively tested on Google Web servers.
It is most effective for short Web trasactions, where it reduced RTOs by 15%
and improved HTTP response time (average by 6%, 99th percentile by 10%).
The transmitted probes account for &lt;0.5% of the overall transmissions.

Signed-off-by: Nandita Dukkipati &lt;nanditad@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-11-10T23:32:51+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-11-10T23:32:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d4185bbf62a5d8d777ee445db1581beb17882a07'/>
<id>d4185bbf62a5d8d777ee445db1581beb17882a07</id>
<content type='text'>
Conflicts:
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Minor conflict between the BCM_CNIC define removal in net-next
and a bug fix added to net.  Based upon a conflict resolution
patch posted by Stephen Rothwell.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Minor conflict between the BCM_CNIC define removal in net-next
and a bug fix added to net.  Based upon a conflict resolution
patch posted by Stephen Rothwell.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: better retrans tracking for defer-accept</title>
<updated>2012-11-03T18:45:00+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-10-27T23:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6c022a4fa2d2d9ca9d0a7ac3b05ad988f39fc30'/>
<id>e6c022a4fa2d2d9ca9d0a7ac3b05ad988f39fc30</id>
<content type='text'>
For passive TCP connections using TCP_DEFER_ACCEPT facility,
we incorrectly increment req-&gt;retrans each time timeout triggers
while no SYNACK is sent.

SYNACK are not sent for TCP_DEFER_ACCEPT that were established (for
which we received the ACK from client). Only the last SYNACK is sent
so that we can receive again an ACK from client, to move the req into
accept queue. We plan to change this later to avoid the useless
retransmit (and potential problem as this SYNACK could be lost)

TCP_INFO later gives wrong information to user, claiming imaginary
retransmits.

Decouple req-&gt;retrans field into two independent fields :

num_retrans : number of retransmit
num_timeout : number of timeouts

num_timeout is the counter that is incremented at each timeout,
regardless of actual SYNACK being sent or not, and used to
compute the exponential timeout.

Introduce inet_rtx_syn_ack() helper to increment num_retrans
only if -&gt;rtx_syn_ack() succeeded.

Use inet_rtx_syn_ack() from tcp_check_req() to increment num_retrans
when we re-send a SYNACK in answer to a (retransmitted) SYN.
Prior to this patch, we were not counting these retransmits.

Change tcp_v[46]_rtx_synack() to increment TCP_MIB_RETRANSSEGS
only if a synack packet was successfully queued.

Reported-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: Vijay Subramanian &lt;subramanian.vijay@gmail.com&gt;
Cc: Elliott Hughes &lt;enh@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For passive TCP connections using TCP_DEFER_ACCEPT facility,
we incorrectly increment req-&gt;retrans each time timeout triggers
while no SYNACK is sent.

SYNACK are not sent for TCP_DEFER_ACCEPT that were established (for
which we received the ACK from client). Only the last SYNACK is sent
so that we can receive again an ACK from client, to move the req into
accept queue. We plan to change this later to avoid the useless
retransmit (and potential problem as this SYNACK could be lost)

TCP_INFO later gives wrong information to user, claiming imaginary
retransmits.

Decouple req-&gt;retrans field into two independent fields :

num_retrans : number of retransmit
num_timeout : number of timeouts

num_timeout is the counter that is incremented at each timeout,
regardless of actual SYNACK being sent or not, and used to
compute the exponential timeout.

Introduce inet_rtx_syn_ack() helper to increment num_retrans
only if -&gt;rtx_syn_ack() succeeded.

Use inet_rtx_syn_ack() from tcp_check_req() to increment num_retrans
when we re-send a SYNACK in answer to a (retransmitted) SYN.
Prior to this patch, we were not counting these retransmits.

Change tcp_v[46]_rtx_synack() to increment TCP_MIB_RETRANSSEGS
only if a synack packet was successfully queued.

Reported-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: Vijay Subramanian &lt;subramanian.vijay@gmail.com&gt;
Cc: Elliott Hughes &lt;enh@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: Reject invalid ack_seq to Fast Open sockets</title>
<updated>2012-10-23T06:42:56+00:00</updated>
<author>
<name>Jerry Chu</name>
<email>hkchu@google.com</email>
</author>
<published>2012-10-22T11:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37561f68bd527ec39076e32effdc7b1dcdfb17ea'/>
<id>37561f68bd527ec39076e32effdc7b1dcdfb17ea</id>
<content type='text'>
A packet with an invalid ack_seq may cause a TCP Fast Open socket to switch
to the unexpected TCP_CLOSING state, triggering a BUG_ON kernel panic.

When a FIN packet with an invalid ack_seq# arrives at a socket in
the TCP_FIN_WAIT1 state, rather than discarding the packet, the current
code will accept the FIN, causing state transition to TCP_CLOSING.

This may be a small deviation from RFC793, which seems to say that the
packet should be dropped. Unfortunately I did not expect this case for
Fast Open hence it will trigger a BUG_ON panic.

It turns out there is really nothing bad about a TFO socket going into
TCP_CLOSING state so I could just remove the BUG_ON statements. But after
some thought I think it's better to treat this case like TCP_SYN_RECV
and return a RST to the confused peer who caused the unacceptable ack_seq
to be generated in the first place.

Signed-off-by: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A packet with an invalid ack_seq may cause a TCP Fast Open socket to switch
to the unexpected TCP_CLOSING state, triggering a BUG_ON kernel panic.

When a FIN packet with an invalid ack_seq# arrives at a socket in
the TCP_FIN_WAIT1 state, rather than discarding the packet, the current
code will accept the FIN, causing state transition to TCP_CLOSING.

This may be a small deviation from RFC793, which seems to say that the
packet should be dropped. Unfortunately I did not expect this case for
Fast Open hence it will trigger a BUG_ON panic.

It turns out there is really nothing bad about a TFO socket going into
TCP_CLOSING state so I could just remove the BUG_ON statements. But after
some thought I think it's better to treat this case like TCP_SYN_RECV
and return a RST to the confused peer who caused the unacceptable ack_seq
to be generated in the first place.

Signed-off-by: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: TCP Fast Open Server - support TFO listeners</title>
<updated>2012-09-01T00:02:19+00:00</updated>
<author>
<name>Jerry Chu</name>
<email>hkchu@google.com</email>
</author>
<published>2012-08-31T12:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8336886f786fdacbc19b719c1f7ea91eb70706d4'/>
<id>8336886f786fdacbc19b719c1f7ea91eb70706d4</id>
<content type='text'>
This patch builds on top of the previous patch to add the support
for TFO listeners. This includes -

1. allocating, properly initializing, and managing the per listener
fastopen_queue structure when TFO is enabled

2. changes to the inet_csk_accept code to support TFO. E.g., the
request_sock can no longer be freed upon accept(), not until 3WHS
finishes

3. allowing a TCP_SYN_RECV socket to properly poll() and sendmsg()
if it's a TFO socket

4. properly closing a TFO listener, and a TFO socket before 3WHS
finishes

5. supporting TCP_FASTOPEN socket option

6. modifying tcp_check_req() to use to check a TFO socket as well
as request_sock

7. supporting TCP's TFO cookie option

8. adding a new SYN-ACK retransmit handler to use the timer directly
off the TFO socket rather than the listener socket. Note that TFO
server side will not retransmit anything other than SYN-ACK until
the 3WHS is completed.

The patch also contains an important function
"reqsk_fastopen_remove()" to manage the somewhat complex relation
between a listener, its request_sock, and the corresponding child
socket. See the comment above the function for the detail.

Signed-off-by: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch builds on top of the previous patch to add the support
for TFO listeners. This includes -

1. allocating, properly initializing, and managing the per listener
fastopen_queue structure when TFO is enabled

2. changes to the inet_csk_accept code to support TFO. E.g., the
request_sock can no longer be freed upon accept(), not until 3WHS
finishes

3. allowing a TCP_SYN_RECV socket to properly poll() and sendmsg()
if it's a TFO socket

4. properly closing a TFO listener, and a TFO socket before 3WHS
finishes

5. supporting TCP_FASTOPEN socket option

6. modifying tcp_check_req() to use to check a TFO socket as well
as request_sock

7. supporting TCP's TFO cookie option

8. adding a new SYN-ACK retransmit handler to use the timer directly
off the TFO socket rather than the listener socket. Note that TFO
server side will not retransmit anything other than SYN-ACK until
the 3WHS is completed.

The patch also contains an important function
"reqsk_fastopen_remove()" to manage the somewhat complex relation
between a listener, its request_sock, and the corresponding child
socket. See the comment above the function for the detail.

Signed-off-by: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: fix possible socket refcount problem</title>
<updated>2012-08-21T21:42:23+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-08-20T00:22:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=144d56e91044181ec0ef67aeca91e9a8b5718348'/>
<id>144d56e91044181ec0ef67aeca91e9a8b5718348</id>
<content type='text'>
Commit 6f458dfb40 (tcp: improve latencies of timer triggered events)
added bug leading to following trace :

[ 2866.131281] IPv4: Attempt to release TCP socket in state 1 ffff880019ec0000
[ 2866.131726]
[ 2866.132188] =========================
[ 2866.132281] [ BUG: held lock freed! ]
[ 2866.132281] 3.6.0-rc1+ #622 Not tainted
[ 2866.132281] -------------------------
[ 2866.132281] kworker/0:1/652 is freeing memory ffff880019ec0000-ffff880019ec0a1f, with a lock still held there!
[ 2866.132281]  (sk_lock-AF_INET-RPC){+.+...}, at: [&lt;ffffffff81903619&gt;] tcp_sendmsg+0x29/0xcc6
[ 2866.132281] 4 locks held by kworker/0:1/652:
[ 2866.132281]  #0:  (rpciod){.+.+.+}, at: [&lt;ffffffff81083567&gt;] process_one_work+0x1de/0x47f
[ 2866.132281]  #1:  ((&amp;task-&gt;u.tk_work)){+.+.+.}, at: [&lt;ffffffff81083567&gt;] process_one_work+0x1de/0x47f
[ 2866.132281]  #2:  (sk_lock-AF_INET-RPC){+.+...}, at: [&lt;ffffffff81903619&gt;] tcp_sendmsg+0x29/0xcc6
[ 2866.132281]  #3:  (&amp;icsk-&gt;icsk_retransmit_timer){+.-...}, at: [&lt;ffffffff81078017&gt;] run_timer_softirq+0x1ad/0x35f
[ 2866.132281]
[ 2866.132281] stack backtrace:
[ 2866.132281] Pid: 652, comm: kworker/0:1 Not tainted 3.6.0-rc1+ #622
[ 2866.132281] Call Trace:
[ 2866.132281]  &lt;IRQ&gt;  [&lt;ffffffff810bc527&gt;] debug_check_no_locks_freed+0x112/0x159
[ 2866.132281]  [&lt;ffffffff818a0839&gt;] ? __sk_free+0xfd/0x114
[ 2866.132281]  [&lt;ffffffff811549fa&gt;] kmem_cache_free+0x6b/0x13a
[ 2866.132281]  [&lt;ffffffff818a0839&gt;] __sk_free+0xfd/0x114
[ 2866.132281]  [&lt;ffffffff818a08c0&gt;] sk_free+0x1c/0x1e
[ 2866.132281]  [&lt;ffffffff81911e1c&gt;] tcp_write_timer+0x51/0x56
[ 2866.132281]  [&lt;ffffffff81078082&gt;] run_timer_softirq+0x218/0x35f
[ 2866.132281]  [&lt;ffffffff81078017&gt;] ? run_timer_softirq+0x1ad/0x35f
[ 2866.132281]  [&lt;ffffffff810f5831&gt;] ? rb_commit+0x58/0x85
[ 2866.132281]  [&lt;ffffffff81911dcb&gt;] ? tcp_write_timer_handler+0x148/0x148
[ 2866.132281]  [&lt;ffffffff81070bd6&gt;] __do_softirq+0xcb/0x1f9
[ 2866.132281]  [&lt;ffffffff81a0a00c&gt;] ? _raw_spin_unlock+0x29/0x2e
[ 2866.132281]  [&lt;ffffffff81a1227c&gt;] call_softirq+0x1c/0x30
[ 2866.132281]  [&lt;ffffffff81039f38&gt;] do_softirq+0x4a/0xa6
[ 2866.132281]  [&lt;ffffffff81070f2b&gt;] irq_exit+0x51/0xad
[ 2866.132281]  [&lt;ffffffff81a129cd&gt;] do_IRQ+0x9d/0xb4
[ 2866.132281]  [&lt;ffffffff81a0a3ef&gt;] common_interrupt+0x6f/0x6f
[ 2866.132281]  &lt;EOI&gt;  [&lt;ffffffff8109d006&gt;] ? sched_clock_cpu+0x58/0xd1
[ 2866.132281]  [&lt;ffffffff81a0a172&gt;] ? _raw_spin_unlock_irqrestore+0x4c/0x56
[ 2866.132281]  [&lt;ffffffff81078692&gt;] mod_timer+0x178/0x1a9
[ 2866.132281]  [&lt;ffffffff818a00aa&gt;] sk_reset_timer+0x19/0x26
[ 2866.132281]  [&lt;ffffffff8190b2cc&gt;] tcp_rearm_rto+0x99/0xa4
[ 2866.132281]  [&lt;ffffffff8190dfba&gt;] tcp_event_new_data_sent+0x6e/0x70
[ 2866.132281]  [&lt;ffffffff8190f7ea&gt;] tcp_write_xmit+0x7de/0x8e4
[ 2866.132281]  [&lt;ffffffff818a565d&gt;] ? __alloc_skb+0xa0/0x1a1
[ 2866.132281]  [&lt;ffffffff8190f952&gt;] __tcp_push_pending_frames+0x2e/0x8a
[ 2866.132281]  [&lt;ffffffff81904122&gt;] tcp_sendmsg+0xb32/0xcc6
[ 2866.132281]  [&lt;ffffffff819229c2&gt;] inet_sendmsg+0xaa/0xd5
[ 2866.132281]  [&lt;ffffffff81922918&gt;] ? inet_autobind+0x5f/0x5f
[ 2866.132281]  [&lt;ffffffff810ee7f1&gt;] ? trace_clock_local+0x9/0xb
[ 2866.132281]  [&lt;ffffffff8189adab&gt;] sock_sendmsg+0xa3/0xc4
[ 2866.132281]  [&lt;ffffffff810f5de6&gt;] ? rb_reserve_next_event+0x26f/0x2d5
[ 2866.132281]  [&lt;ffffffff8103e6a9&gt;] ? native_sched_clock+0x29/0x6f
[ 2866.132281]  [&lt;ffffffff8103e6f8&gt;] ? sched_clock+0x9/0xd
[ 2866.132281]  [&lt;ffffffff810ee7f1&gt;] ? trace_clock_local+0x9/0xb
[ 2866.132281]  [&lt;ffffffff8189ae03&gt;] kernel_sendmsg+0x37/0x43
[ 2866.132281]  [&lt;ffffffff8199ce49&gt;] xs_send_kvec+0x77/0x80
[ 2866.132281]  [&lt;ffffffff8199cec1&gt;] xs_sendpages+0x6f/0x1a0
[ 2866.132281]  [&lt;ffffffff8107826d&gt;] ? try_to_del_timer_sync+0x55/0x61
[ 2866.132281]  [&lt;ffffffff8199d0d2&gt;] xs_tcp_send_request+0x55/0xf1
[ 2866.132281]  [&lt;ffffffff8199bb90&gt;] xprt_transmit+0x89/0x1db
[ 2866.132281]  [&lt;ffffffff81999bcd&gt;] ? call_connect+0x3c/0x3c
[ 2866.132281]  [&lt;ffffffff81999d92&gt;] call_transmit+0x1c5/0x20e
[ 2866.132281]  [&lt;ffffffff819a0d55&gt;] __rpc_execute+0x6f/0x225
[ 2866.132281]  [&lt;ffffffff81999bcd&gt;] ? call_connect+0x3c/0x3c
[ 2866.132281]  [&lt;ffffffff819a0f33&gt;] rpc_async_schedule+0x28/0x34
[ 2866.132281]  [&lt;ffffffff810835d6&gt;] process_one_work+0x24d/0x47f
[ 2866.132281]  [&lt;ffffffff81083567&gt;] ? process_one_work+0x1de/0x47f
[ 2866.132281]  [&lt;ffffffff819a0f0b&gt;] ? __rpc_execute+0x225/0x225
[ 2866.132281]  [&lt;ffffffff81083a6d&gt;] worker_thread+0x236/0x317
[ 2866.132281]  [&lt;ffffffff81083837&gt;] ? process_scheduled_works+0x2f/0x2f
[ 2866.132281]  [&lt;ffffffff8108b7b8&gt;] kthread+0x9a/0xa2
[ 2866.132281]  [&lt;ffffffff81a12184&gt;] kernel_thread_helper+0x4/0x10
[ 2866.132281]  [&lt;ffffffff81a0a4b0&gt;] ? retint_restore_args+0x13/0x13
[ 2866.132281]  [&lt;ffffffff8108b71e&gt;] ? __init_kthread_worker+0x5a/0x5a
[ 2866.132281]  [&lt;ffffffff81a12180&gt;] ? gs_change+0x13/0x13
[ 2866.308506] IPv4: Attempt to release TCP socket in state 1 ffff880019ec0000
[ 2866.309689] =============================================================================
[ 2866.310254] BUG TCP (Not tainted): Object already free
[ 2866.310254] -----------------------------------------------------------------------------
[ 2866.310254]

The bug comes from the fact that timer set in sk_reset_timer() can run
before we actually do the sock_hold(). socket refcount reaches zero and
we free the socket too soon.

timer handler is not allowed to reduce socket refcnt if socket is owned
by the user, or we need to change sk_reset_timer() implementation.

We should take a reference on the socket in case TCP_DELACK_TIMER_DEFERRED
or TCP_DELACK_TIMER_DEFERRED bit are set in tsq_flags

Also fix a typo in tcp_delack_timer(), where TCP_WRITE_TIMER_DEFERRED
was used instead of TCP_DELACK_TIMER_DEFERRED.

For consistency, use same socket refcount change for TCP_MTU_REDUCED_DEFERRED,
even if not fired from a timer.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Tested-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 6f458dfb40 (tcp: improve latencies of timer triggered events)
added bug leading to following trace :

[ 2866.131281] IPv4: Attempt to release TCP socket in state 1 ffff880019ec0000
[ 2866.131726]
[ 2866.132188] =========================
[ 2866.132281] [ BUG: held lock freed! ]
[ 2866.132281] 3.6.0-rc1+ #622 Not tainted
[ 2866.132281] -------------------------
[ 2866.132281] kworker/0:1/652 is freeing memory ffff880019ec0000-ffff880019ec0a1f, with a lock still held there!
[ 2866.132281]  (sk_lock-AF_INET-RPC){+.+...}, at: [&lt;ffffffff81903619&gt;] tcp_sendmsg+0x29/0xcc6
[ 2866.132281] 4 locks held by kworker/0:1/652:
[ 2866.132281]  #0:  (rpciod){.+.+.+}, at: [&lt;ffffffff81083567&gt;] process_one_work+0x1de/0x47f
[ 2866.132281]  #1:  ((&amp;task-&gt;u.tk_work)){+.+.+.}, at: [&lt;ffffffff81083567&gt;] process_one_work+0x1de/0x47f
[ 2866.132281]  #2:  (sk_lock-AF_INET-RPC){+.+...}, at: [&lt;ffffffff81903619&gt;] tcp_sendmsg+0x29/0xcc6
[ 2866.132281]  #3:  (&amp;icsk-&gt;icsk_retransmit_timer){+.-...}, at: [&lt;ffffffff81078017&gt;] run_timer_softirq+0x1ad/0x35f
[ 2866.132281]
[ 2866.132281] stack backtrace:
[ 2866.132281] Pid: 652, comm: kworker/0:1 Not tainted 3.6.0-rc1+ #622
[ 2866.132281] Call Trace:
[ 2866.132281]  &lt;IRQ&gt;  [&lt;ffffffff810bc527&gt;] debug_check_no_locks_freed+0x112/0x159
[ 2866.132281]  [&lt;ffffffff818a0839&gt;] ? __sk_free+0xfd/0x114
[ 2866.132281]  [&lt;ffffffff811549fa&gt;] kmem_cache_free+0x6b/0x13a
[ 2866.132281]  [&lt;ffffffff818a0839&gt;] __sk_free+0xfd/0x114
[ 2866.132281]  [&lt;ffffffff818a08c0&gt;] sk_free+0x1c/0x1e
[ 2866.132281]  [&lt;ffffffff81911e1c&gt;] tcp_write_timer+0x51/0x56
[ 2866.132281]  [&lt;ffffffff81078082&gt;] run_timer_softirq+0x218/0x35f
[ 2866.132281]  [&lt;ffffffff81078017&gt;] ? run_timer_softirq+0x1ad/0x35f
[ 2866.132281]  [&lt;ffffffff810f5831&gt;] ? rb_commit+0x58/0x85
[ 2866.132281]  [&lt;ffffffff81911dcb&gt;] ? tcp_write_timer_handler+0x148/0x148
[ 2866.132281]  [&lt;ffffffff81070bd6&gt;] __do_softirq+0xcb/0x1f9
[ 2866.132281]  [&lt;ffffffff81a0a00c&gt;] ? _raw_spin_unlock+0x29/0x2e
[ 2866.132281]  [&lt;ffffffff81a1227c&gt;] call_softirq+0x1c/0x30
[ 2866.132281]  [&lt;ffffffff81039f38&gt;] do_softirq+0x4a/0xa6
[ 2866.132281]  [&lt;ffffffff81070f2b&gt;] irq_exit+0x51/0xad
[ 2866.132281]  [&lt;ffffffff81a129cd&gt;] do_IRQ+0x9d/0xb4
[ 2866.132281]  [&lt;ffffffff81a0a3ef&gt;] common_interrupt+0x6f/0x6f
[ 2866.132281]  &lt;EOI&gt;  [&lt;ffffffff8109d006&gt;] ? sched_clock_cpu+0x58/0xd1
[ 2866.132281]  [&lt;ffffffff81a0a172&gt;] ? _raw_spin_unlock_irqrestore+0x4c/0x56
[ 2866.132281]  [&lt;ffffffff81078692&gt;] mod_timer+0x178/0x1a9
[ 2866.132281]  [&lt;ffffffff818a00aa&gt;] sk_reset_timer+0x19/0x26
[ 2866.132281]  [&lt;ffffffff8190b2cc&gt;] tcp_rearm_rto+0x99/0xa4
[ 2866.132281]  [&lt;ffffffff8190dfba&gt;] tcp_event_new_data_sent+0x6e/0x70
[ 2866.132281]  [&lt;ffffffff8190f7ea&gt;] tcp_write_xmit+0x7de/0x8e4
[ 2866.132281]  [&lt;ffffffff818a565d&gt;] ? __alloc_skb+0xa0/0x1a1
[ 2866.132281]  [&lt;ffffffff8190f952&gt;] __tcp_push_pending_frames+0x2e/0x8a
[ 2866.132281]  [&lt;ffffffff81904122&gt;] tcp_sendmsg+0xb32/0xcc6
[ 2866.132281]  [&lt;ffffffff819229c2&gt;] inet_sendmsg+0xaa/0xd5
[ 2866.132281]  [&lt;ffffffff81922918&gt;] ? inet_autobind+0x5f/0x5f
[ 2866.132281]  [&lt;ffffffff810ee7f1&gt;] ? trace_clock_local+0x9/0xb
[ 2866.132281]  [&lt;ffffffff8189adab&gt;] sock_sendmsg+0xa3/0xc4
[ 2866.132281]  [&lt;ffffffff810f5de6&gt;] ? rb_reserve_next_event+0x26f/0x2d5
[ 2866.132281]  [&lt;ffffffff8103e6a9&gt;] ? native_sched_clock+0x29/0x6f
[ 2866.132281]  [&lt;ffffffff8103e6f8&gt;] ? sched_clock+0x9/0xd
[ 2866.132281]  [&lt;ffffffff810ee7f1&gt;] ? trace_clock_local+0x9/0xb
[ 2866.132281]  [&lt;ffffffff8189ae03&gt;] kernel_sendmsg+0x37/0x43
[ 2866.132281]  [&lt;ffffffff8199ce49&gt;] xs_send_kvec+0x77/0x80
[ 2866.132281]  [&lt;ffffffff8199cec1&gt;] xs_sendpages+0x6f/0x1a0
[ 2866.132281]  [&lt;ffffffff8107826d&gt;] ? try_to_del_timer_sync+0x55/0x61
[ 2866.132281]  [&lt;ffffffff8199d0d2&gt;] xs_tcp_send_request+0x55/0xf1
[ 2866.132281]  [&lt;ffffffff8199bb90&gt;] xprt_transmit+0x89/0x1db
[ 2866.132281]  [&lt;ffffffff81999bcd&gt;] ? call_connect+0x3c/0x3c
[ 2866.132281]  [&lt;ffffffff81999d92&gt;] call_transmit+0x1c5/0x20e
[ 2866.132281]  [&lt;ffffffff819a0d55&gt;] __rpc_execute+0x6f/0x225
[ 2866.132281]  [&lt;ffffffff81999bcd&gt;] ? call_connect+0x3c/0x3c
[ 2866.132281]  [&lt;ffffffff819a0f33&gt;] rpc_async_schedule+0x28/0x34
[ 2866.132281]  [&lt;ffffffff810835d6&gt;] process_one_work+0x24d/0x47f
[ 2866.132281]  [&lt;ffffffff81083567&gt;] ? process_one_work+0x1de/0x47f
[ 2866.132281]  [&lt;ffffffff819a0f0b&gt;] ? __rpc_execute+0x225/0x225
[ 2866.132281]  [&lt;ffffffff81083a6d&gt;] worker_thread+0x236/0x317
[ 2866.132281]  [&lt;ffffffff81083837&gt;] ? process_scheduled_works+0x2f/0x2f
[ 2866.132281]  [&lt;ffffffff8108b7b8&gt;] kthread+0x9a/0xa2
[ 2866.132281]  [&lt;ffffffff81a12184&gt;] kernel_thread_helper+0x4/0x10
[ 2866.132281]  [&lt;ffffffff81a0a4b0&gt;] ? retint_restore_args+0x13/0x13
[ 2866.132281]  [&lt;ffffffff8108b71e&gt;] ? __init_kthread_worker+0x5a/0x5a
[ 2866.132281]  [&lt;ffffffff81a12180&gt;] ? gs_change+0x13/0x13
[ 2866.308506] IPv4: Attempt to release TCP socket in state 1 ffff880019ec0000
[ 2866.309689] =============================================================================
[ 2866.310254] BUG TCP (Not tainted): Object already free
[ 2866.310254] -----------------------------------------------------------------------------
[ 2866.310254]

The bug comes from the fact that timer set in sk_reset_timer() can run
before we actually do the sock_hold(). socket refcount reaches zero and
we free the socket too soon.

timer handler is not allowed to reduce socket refcnt if socket is owned
by the user, or we need to change sk_reset_timer() implementation.

We should take a reference on the socket in case TCP_DELACK_TIMER_DEFERRED
or TCP_DELACK_TIMER_DEFERRED bit are set in tsq_flags

Also fix a typo in tcp_delack_timer(), where TCP_WRITE_TIMER_DEFERRED
was used instead of TCP_DELACK_TIMER_DEFERRED.

For consistency, use same socket refcount change for TCP_MTU_REDUCED_DEFERRED,
even if not fired from a timer.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Tested-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: improve latencies of timer triggered events</title>
<updated>2012-07-20T17:59:41+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-07-20T05:45:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f458dfb409272082c9bfa412f77ff2fc21c626f'/>
<id>6f458dfb409272082c9bfa412f77ff2fc21c626f</id>
<content type='text'>
Modern TCP stack highly depends on tcp_write_timer() having a small
latency, but current implementation doesn't exactly meet the
expectations.

When a timer fires but finds the socket is owned by the user, it rearms
itself for an additional delay hoping next run will be more
successful.

tcp_write_timer() for example uses a 50ms delay for next try, and it
defeats many attempts to get predictable TCP behavior in term of
latencies.

Use the recently introduced tcp_release_cb(), so that the user owning
the socket will call various handlers right before socket release.

This will permit us to post a followup patch to address the
tcp_tso_should_defer() syndrome (some deferred packets have to wait
RTO timer to be transmitted, while cwnd should allow us to send them
sooner)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Nandita Dukkipati &lt;nanditad@google.com&gt;
Cc: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Cc: John Heffner &lt;johnwheffner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modern TCP stack highly depends on tcp_write_timer() having a small
latency, but current implementation doesn't exactly meet the
expectations.

When a timer fires but finds the socket is owned by the user, it rearms
itself for an additional delay hoping next run will be more
successful.

tcp_write_timer() for example uses a 50ms delay for next try, and it
defeats many attempts to get predictable TCP behavior in term of
latencies.

Use the recently introduced tcp_release_cb(), so that the user owning
the socket will call various handlers right before socket release.

This will permit us to post a followup patch to address the
tcp_tso_should_defer() syndrome (some deferred packets have to wait
RTO timer to be transmitted, while cwnd should allow us to send them
sooner)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Nandita Dukkipati &lt;nanditad@google.com&gt;
Cc: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Cc: John Heffner &lt;johnwheffner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: early retransmit: delayed fast retransmit</title>
<updated>2012-05-03T00:56:10+00:00</updated>
<author>
<name>Yuchung Cheng</name>
<email>ycheng@google.com</email>
</author>
<published>2012-05-02T13:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=750ea2bafa55aaed208b2583470ecd7122225634'/>
<id>750ea2bafa55aaed208b2583470ecd7122225634</id>
<content type='text'>
Implementing the advanced early retransmit (sysctl_tcp_early_retrans==2).
Delays the fast retransmit by an interval of RTT/4. We borrow the
RTO timer to implement the delay. If we receive another ACK or send
a new packet, the timer is cancelled and restored to original RTO
value offset by time elapsed.  When the delayed-ER timer fires,
we enter fast recovery and perform fast retransmit.

Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementing the advanced early retransmit (sysctl_tcp_early_retrans==2).
Delays the fast retransmit by an interval of RTT/4. We borrow the
RTO timer to implement the delay. If we receive another ACK or send
a new packet, the timer is cancelled and restored to original RTO
value offset by time elapsed.  When the delayed-ER timer fires,
we enter fast recovery and perform fast retransmit.

Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
