diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-10-01 18:27:19 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:53:58 -0400 |
commit | dc86967b54aaf64fb053cce83c05a4476d48583b (patch) | |
tree | a87709ce0ce71151e0c6de25304762b2f63c0e8b /net/ipv4 | |
parent | 8336793baf962163c9fab5a3f39614295fdbab27 (diff) |
[TCP]: No fackets_out/highest_sack tuning when SACK isn't enabled
This was found due to bug report from Cedric Le Goater though
it turned this turned out to be unrelated bug.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 94c80113df7e..6199abeb0f5e 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -660,7 +660,7 @@ static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned | |||
660 | static void tcp_adjust_fackets_out(struct tcp_sock *tp, struct sk_buff *skb, | 660 | static void tcp_adjust_fackets_out(struct tcp_sock *tp, struct sk_buff *skb, |
661 | int decr) | 661 | int decr) |
662 | { | 662 | { |
663 | if (!tp->sacked_out) | 663 | if (!tp->sacked_out || tcp_is_reno(tp)) |
664 | return; | 664 | return; |
665 | 665 | ||
666 | if (!before(tp->highest_sack, TCP_SKB_CB(skb)->seq)) | 666 | if (!before(tp->highest_sack, TCP_SKB_CB(skb)->seq)) |
@@ -712,7 +712,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss | |||
712 | TCP_SKB_CB(buff)->end_seq = TCP_SKB_CB(skb)->end_seq; | 712 | TCP_SKB_CB(buff)->end_seq = TCP_SKB_CB(skb)->end_seq; |
713 | TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq; | 713 | TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq; |
714 | 714 | ||
715 | if (tp->sacked_out && (TCP_SKB_CB(skb)->seq == tp->highest_sack)) | 715 | if (tcp_is_sack(tp) && tp->sacked_out && |
716 | (TCP_SKB_CB(skb)->seq == tp->highest_sack)) | ||
716 | tp->highest_sack = TCP_SKB_CB(buff)->seq; | 717 | tp->highest_sack = TCP_SKB_CB(buff)->seq; |
717 | 718 | ||
718 | /* PSH and FIN should only be set in the second packet. */ | 719 | /* PSH and FIN should only be set in the second packet. */ |
@@ -1718,7 +1719,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m | |||
1718 | BUG_ON(tcp_skb_pcount(skb) != 1 || | 1719 | BUG_ON(tcp_skb_pcount(skb) != 1 || |
1719 | tcp_skb_pcount(next_skb) != 1); | 1720 | tcp_skb_pcount(next_skb) != 1); |
1720 | 1721 | ||
1721 | if (WARN_ON(tp->sacked_out && | 1722 | if (WARN_ON(tcp_is_sack(tp) && tp->sacked_out && |
1722 | (TCP_SKB_CB(next_skb)->seq == tp->highest_sack))) | 1723 | (TCP_SKB_CB(next_skb)->seq == tp->highest_sack))) |
1723 | return; | 1724 | return; |
1724 | 1725 | ||