aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-11-15 22:41:46 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:54:03 -0500
commita47e5a988a575e64c8c9bae65a1dfe3dca7cba32 (patch)
tree30c389efb3a98a7af24150e5f6462f3c379d1e63 /net/ipv4/tcp_input.c
parent85cc391c0e4584db594bfc4005c63c07c76c5077 (diff)
[TCP]: Convert highest_sack to sk_buff to allow direct access
It is going to replace the sack fastpath hint quite soon... :-) 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_input.c')
-rw-r--r--net/ipv4/tcp_input.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c0e8f2b1fa7e..31294b52ad42 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1245,7 +1245,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1245 int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3; 1245 int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3;
1246 int reord = tp->packets_out; 1246 int reord = tp->packets_out;
1247 int prior_fackets; 1247 int prior_fackets;
1248 u32 highest_sack_end_seq = tp->lost_retrans_low; 1248 u32 highest_sack_end_seq;
1249 int flag = 0; 1249 int flag = 0;
1250 int found_dup_sack = 0; 1250 int found_dup_sack = 0;
1251 int cached_fack_count; 1251 int cached_fack_count;
@@ -1256,7 +1256,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1256 if (!tp->sacked_out) { 1256 if (!tp->sacked_out) {
1257 if (WARN_ON(tp->fackets_out)) 1257 if (WARN_ON(tp->fackets_out))
1258 tp->fackets_out = 0; 1258 tp->fackets_out = 0;
1259 tp->highest_sack = tp->snd_una; 1259 tp->highest_sack = tcp_write_queue_head(sk);
1260 } 1260 }
1261 prior_fackets = tp->fackets_out; 1261 prior_fackets = tp->fackets_out;
1262 1262
@@ -1483,10 +1483,9 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1483 if (fack_count > tp->fackets_out) 1483 if (fack_count > tp->fackets_out)
1484 tp->fackets_out = fack_count; 1484 tp->fackets_out = fack_count;
1485 1485
1486 if (after(TCP_SKB_CB(skb)->seq, tp->highest_sack)) { 1486 if (after(TCP_SKB_CB(skb)->seq, tcp_highest_sack_seq(tp)))
1487 tp->highest_sack = TCP_SKB_CB(skb)->seq; 1487 tp->highest_sack = skb;
1488 highest_sack_end_seq = TCP_SKB_CB(skb)->end_seq; 1488
1489 }
1490 } else { 1489 } else {
1491 if (dup_sack && (sacked&TCPCB_RETRANS)) 1490 if (dup_sack && (sacked&TCPCB_RETRANS))
1492 reord = min(fack_count, reord); 1491 reord = min(fack_count, reord);
@@ -1514,6 +1513,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1514 flag &= ~FLAG_ONLY_ORIG_SACKED; 1513 flag &= ~FLAG_ONLY_ORIG_SACKED;
1515 } 1514 }
1516 1515
1516 highest_sack_end_seq = TCP_SKB_CB(tp->highest_sack)->end_seq;
1517 if (tcp_is_fack(tp) && tp->retrans_out && 1517 if (tcp_is_fack(tp) && tp->retrans_out &&
1518 after(highest_sack_end_seq, tp->lost_retrans_low) && 1518 after(highest_sack_end_seq, tp->lost_retrans_low) &&
1519 icsk->icsk_ca_state == TCP_CA_Recovery) 1519 icsk->icsk_ca_state == TCP_CA_Recovery)