Skip to content

Commit

Permalink
tcp: Don't clear hints when tcp_fragmenting
Browse files Browse the repository at this point in the history
1) We didn't remove any skbs, so no need to handle stale refs.

2) scoreboard_skb_hint is trivial, no timestamps were changed
   so no need to clear that one

3) lost_skb_hint needs tweaking similar to that of
   tcp_sacktag_one().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Mar 2, 2009
1 parent 62ad276 commit d3d2ae4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,6 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,

BUG_ON(len > skb->len);

tcp_clear_retrans_hints_partial(tp);
nsize = skb_headlen(skb) - len;
if (nsize < 0)
nsize = 0;
Expand Down Expand Up @@ -854,6 +853,12 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
tcp_verify_left_out(tp);
}
tcp_adjust_fackets_out(sk, skb, diff);

if (tp->lost_skb_hint &&
before(TCP_SKB_CB(skb)->seq,
TCP_SKB_CB(tp->lost_skb_hint)->seq) &&
(tcp_is_fack(tp) || TCP_SKB_CB(skb)->sacked))
tp->lost_cnt_hint -= diff;
}

/* Link BUFF into the send queue. */
Expand Down

0 comments on commit d3d2ae4

Please sign in to comment.