Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111744
b: refs/heads/master
c: ef9da47
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Sep 21, 2008
1 parent 3a40b7e commit 35e2900
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 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: f0ceb0ed86b4792a4ed9d3438f5f7572e48f9803
refs/heads/master: ef9da47c7cc64d69526331f315e76b5680d4048f
7 changes: 6 additions & 1 deletion trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1037,10 +1037,15 @@ static inline void tcp_mib_init(struct net *net)
}

/* from STCP */
static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp)
static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp)
{
tp->lost_skb_hint = NULL;
tp->scoreboard_skb_hint = NULL;
}

static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp)
{
tcp_clear_retrans_hints_partial(tp);
tp->retransmit_skb_hint = NULL;
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,9 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets)

tcp_unlink_write_queue(skb, sk);
sk_wmem_free_skb(sk, skb);
tcp_clear_all_retrans_hints(tp);
tcp_clear_retrans_hints_partial(tp);
if (skb == tp->retransmit_skb_hint)
tp->retransmit_skb_hint = NULL;
}

if (skb && (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
Expand Down
8 changes: 5 additions & 3 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,

BUG_ON(len > skb->len);

tcp_clear_all_retrans_hints(tp);
tcp_clear_retrans_hints_partial(tp);
nsize = skb_headlen(skb) - len;
if (nsize < 0)
nsize = 0;
Expand Down Expand Up @@ -1823,7 +1823,9 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb,
tp->packets_out -= tcp_skb_pcount(next_skb);

/* changed transmit queue under us so clear hints */
tcp_clear_all_retrans_hints(tp);
tcp_clear_retrans_hints_partial(tp);
if (next_skb == tp->retransmit_skb_hint)
tp->retransmit_skb_hint = skb;

sk_wmem_free_skb(sk, next_skb);
}
Expand Down Expand Up @@ -1853,7 +1855,7 @@ void tcp_simple_retransmit(struct sock *sk)
}
}

tcp_clear_all_retrans_hints(tp);
tcp_clear_retrans_hints_partial(tp);

if (prior_lost == tp->lost_out)
return;
Expand Down

0 comments on commit 35e2900

Please sign in to comment.