Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88254
b: refs/heads/master
c: c137f3d
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Apr 8, 2008
1 parent 72acfa3 commit 1adc1c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b69d745397eac12b3f8a2eb6b799cd476aef282
refs/heads/master: c137f3dda04b0aee1bc6889cdc69185f53df8a82
22 changes: 18 additions & 4 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
int cnt;
int cnt, oldcnt;
int err;
unsigned int mss;

BUG_TRAP(packets <= tp->packets_out);
if (tp->lost_skb_hint) {
Expand All @@ -2157,13 +2159,25 @@ static void tcp_mark_head_lost(struct sock *sk, int packets)
tp->lost_skb_hint = skb;
tp->lost_cnt_hint = cnt;

if (after(TCP_SKB_CB(skb)->end_seq, tp->high_seq))
break;

oldcnt = cnt;
if (tcp_is_fack(tp) || tcp_is_reno(tp) ||
(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
cnt += tcp_skb_pcount(skb);

if ((cnt > packets) ||
after(TCP_SKB_CB(skb)->end_seq, tp->high_seq))
break;
if (cnt > packets) {
if (tcp_is_sack(tp) || (oldcnt >= packets))
break;

mss = skb_shinfo(skb)->gso_size;
err = tcp_fragment(sk, skb, (packets - oldcnt) * mss, mss);
if (err < 0)
break;
cnt = packets;
}

if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) {
TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
tp->lost_out += tcp_skb_pcount(skb);
Expand Down

0 comments on commit 1adc1c1

Please sign in to comment.