Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5773
b: refs/heads/master
c: b5da623
h: refs/heads/master
i:
  5771: 5d9da81
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Aug 11, 2005
1 parent d4bffa5 commit a4f6eb6
Show file tree
Hide file tree
Showing 2 changed files with 11 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: bc68552faad0e134eb22281343d5ae5a4873fa80
refs/heads/master: b5da623ae9be680ea59f268eeb339f0acb2d88c4
14 changes: 10 additions & 4 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,15 +1370,21 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)

if (skb->len > cur_mss) {
int old_factor = tcp_skb_pcount(skb);
int new_factor;
int diff;

if (tcp_fragment(sk, skb, cur_mss, cur_mss))
return -ENOMEM; /* We'll try again later. */

/* New SKB created, account for it. */
new_factor = tcp_skb_pcount(skb);
tp->packets_out -= old_factor - new_factor;
tp->packets_out += tcp_skb_pcount(skb->next);
diff = old_factor - tcp_skb_pcount(skb) -
tcp_skb_pcount(skb->next);
tp->packets_out -= diff;

if (diff > 0) {
tp->fackets_out -= diff;
if ((int)tp->fackets_out < 0)
tp->fackets_out = 0;
}
}

/* Collapse two adjacent packets if worthwhile and we can. */
Expand Down

0 comments on commit a4f6eb6

Please sign in to comment.