diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 17:06:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 17:06:58 -0400 |
commit | a52cefc80fc92981592c688d1c8067442afe4cec (patch) | |
tree | ad119b5a4f5e4a257779c0ef324b5c9354c915f1 /net/ipv4/tcp_input.c | |
parent | fba956c46a72f9e7503fd464ffee43c632307e31 (diff) | |
parent | 4acad72ded8e3f0211bd2a762e23c28229c61a51 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
[IPV6]: Consolidate the ip6_pol_route_(input|output) pair
[TCP]: Make snd_cwnd_cnt 32-bit
[TCP]: Update the /proc/net/tcp documentation
[NETNS]: Don't panic on creating the namespace's loopback
[NEIGH]: Ensure that pneigh_lookup is protected with RTNL
[INET]: kmalloc+memset -> kzalloc in frag_alloc_queue
[ISDN]: Fix compile with CONFIG_ISDN_X25 disabled.
[IPV6]: Replace sk_buff ** with sk_buff * in input handlers
[SELINUX]: Update for netfilter ->hook() arg changes.
[INET]: Consolidate the xxx_put
[INET]: Small cleanup for xxx_put after evictor consolidation
[INET]: Consolidate the xxx_evictor
[INET]: Consolidate the xxx_frag_destroy
[INET]: Consolidate xxx_the secret_rebuild
[INET]: Consolidate the xxx_frag_kill
[INET]: Collect common frag sysctl variables together
[INET]: Collect frag queues management objects together
[INET]: Move common fields from frag_queues in one place.
[TG3]: Fix performance regression on 5705.
[ISDN]: Remove local copy of device name to make sure renames work.
...
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 0a42e9340346..0f00966b1784 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1995,8 +1995,7 @@ static void tcp_verify_retransmit_hint(struct tcp_sock *tp, | |||
1995 | } | 1995 | } |
1996 | 1996 | ||
1997 | /* Mark head of queue up as lost. */ | 1997 | /* Mark head of queue up as lost. */ |
1998 | static void tcp_mark_head_lost(struct sock *sk, | 1998 | static void tcp_mark_head_lost(struct sock *sk, int packets) |
1999 | int packets, u32 high_seq) | ||
2000 | { | 1999 | { |
2001 | struct tcp_sock *tp = tcp_sk(sk); | 2000 | struct tcp_sock *tp = tcp_sk(sk); |
2002 | struct sk_buff *skb; | 2001 | struct sk_buff *skb; |
@@ -2019,7 +2018,7 @@ static void tcp_mark_head_lost(struct sock *sk, | |||
2019 | tp->lost_skb_hint = skb; | 2018 | tp->lost_skb_hint = skb; |
2020 | tp->lost_cnt_hint = cnt; | 2019 | tp->lost_cnt_hint = cnt; |
2021 | cnt += tcp_skb_pcount(skb); | 2020 | cnt += tcp_skb_pcount(skb); |
2022 | if (cnt > packets || after(TCP_SKB_CB(skb)->end_seq, high_seq)) | 2021 | if (cnt > packets || after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) |
2023 | break; | 2022 | break; |
2024 | if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { | 2023 | if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { |
2025 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; | 2024 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; |
@@ -2040,9 +2039,9 @@ static void tcp_update_scoreboard(struct sock *sk) | |||
2040 | int lost = tp->fackets_out - tp->reordering; | 2039 | int lost = tp->fackets_out - tp->reordering; |
2041 | if (lost <= 0) | 2040 | if (lost <= 0) |
2042 | lost = 1; | 2041 | lost = 1; |
2043 | tcp_mark_head_lost(sk, lost, tp->high_seq); | 2042 | tcp_mark_head_lost(sk, lost); |
2044 | } else { | 2043 | } else { |
2045 | tcp_mark_head_lost(sk, 1, tp->high_seq); | 2044 | tcp_mark_head_lost(sk, 1); |
2046 | } | 2045 | } |
2047 | 2046 | ||
2048 | /* New heuristics: it is possible only after we switched | 2047 | /* New heuristics: it is possible only after we switched |
@@ -2381,7 +2380,7 @@ tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) | |||
2381 | before(tp->snd_una, tp->high_seq) && | 2380 | before(tp->snd_una, tp->high_seq) && |
2382 | icsk->icsk_ca_state != TCP_CA_Open && | 2381 | icsk->icsk_ca_state != TCP_CA_Open && |
2383 | tp->fackets_out > tp->reordering) { | 2382 | tp->fackets_out > tp->reordering) { |
2384 | tcp_mark_head_lost(sk, tp->fackets_out-tp->reordering, tp->high_seq); | 2383 | tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering); |
2385 | NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); | 2384 | NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); |
2386 | } | 2385 | } |
2387 | 2386 | ||