aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-04-30 03:42:20 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-30 03:58:16 -0400
commitd551e4541dd60ae53459f77a971f2d6043431f5f (patch)
treecb328b1ec7ae32ad054c9d08de0274e4056a868f /net/ipv4/tcp_output.c
parent575ee7140dabe9b9c4f66f4f867039b97e548867 (diff)
[TCP] FRTO: RFC4138 allows Nagle override when new data must be sent
This is a corner case where less than MSS sized new data thingie is awaiting in the send queue. For F-RTO to work correctly, a new data segment must be sent at certain point or F-RTO cannot be used at all. RFC4138 allows overriding of Nagle at that point. Implementation uses frto_counter states 2 and 3 to distinguish when Nagle override is needed. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b5fa3c19afee..0faacf9c419d 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1035,8 +1035,10 @@ static inline int tcp_nagle_test(struct tcp_sock *tp, struct sk_buff *skb,
1035 if (nonagle & TCP_NAGLE_PUSH) 1035 if (nonagle & TCP_NAGLE_PUSH)
1036 return 1; 1036 return 1;
1037 1037
1038 /* Don't use the nagle rule for urgent data (or for the final FIN). */ 1038 /* Don't use the nagle rule for urgent data (or for the final FIN).
1039 if (tp->urg_mode || 1039 * Nagle can be ignored during F-RTO too (see RFC4138).
1040 */
1041 if (tp->urg_mode || (tp->frto_counter == 2) ||
1040 (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)) 1042 (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN))
1041 return 1; 1043 return 1;
1042 1044