]> err.no Git - linux-2.6/blobdiff - include/net/tcp.h
m68k: remove unused adb.h
[linux-2.6] / include / net / tcp.h
index a385797f160a3a6d5d62a068e6dd494f91905ca6..ef8f9d4dae8501459ce9a9f4fb38dff5407d3945 100644 (file)
@@ -736,9 +736,7 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk)
 
 static inline void tcp_sync_left_out(struct tcp_sock *tp)
 {
-       if (tp->rx_opt.sack_ok &&
-           (tp->sacked_out >= tp->packets_out - tp->lost_out))
-               tp->sacked_out = tp->packets_out - tp->lost_out;
+       BUG_ON(tp->sacked_out + tp->lost_out > tp->packets_out);
        tp->left_out = tp->sacked_out + tp->lost_out;
 }
 
@@ -1201,9 +1199,14 @@ static inline struct sk_buff *tcp_send_head(struct sock *sk)
 
 static inline void tcp_advance_send_head(struct sock *sk, struct sk_buff *skb)
 {
+       struct tcp_sock *tp = tcp_sk(sk);
+
        sk->sk_send_head = skb->next;
        if (sk->sk_send_head == (struct sk_buff *)&sk->sk_write_queue)
                sk->sk_send_head = NULL;
+       /* Don't override Nagle indefinately with F-RTO */
+       if (tp->frto_counter == 2)
+               tp->frto_counter = 3;
 }
 
 static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked)