|
@@ -160,7 +160,8 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
|
|
}
|
|
}
|
|
|
|
|
|
/* Account for an ACK we sent. */
|
|
/* Account for an ACK we sent. */
|
|
-static inline void tcp_event_ack_sent(struct sock *sk, unsigned int pkts)
|
|
|
|
|
|
+static inline void tcp_event_ack_sent(struct sock *sk, unsigned int pkts,
|
|
|
|
+ u32 rcv_nxt)
|
|
{
|
|
{
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
|
|
|
|
@@ -171,6 +172,9 @@ static inline void tcp_event_ack_sent(struct sock *sk, unsigned int pkts)
|
|
if (hrtimer_try_to_cancel(&tp->compressed_ack_timer) == 1)
|
|
if (hrtimer_try_to_cancel(&tp->compressed_ack_timer) == 1)
|
|
__sock_put(sk);
|
|
__sock_put(sk);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (unlikely(rcv_nxt != tp->rcv_nxt))
|
|
|
|
+ return; /* Special ACK sent by DCTCP to reflect ECN */
|
|
tcp_dec_quickack_mode(sk, pkts);
|
|
tcp_dec_quickack_mode(sk, pkts);
|
|
inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK);
|
|
inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK);
|
|
}
|
|
}
|
|
@@ -1141,7 +1145,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,
|
|
icsk->icsk_af_ops->send_check(sk, skb);
|
|
icsk->icsk_af_ops->send_check(sk, skb);
|
|
|
|
|
|
if (likely(tcb->tcp_flags & TCPHDR_ACK))
|
|
if (likely(tcb->tcp_flags & TCPHDR_ACK))
|
|
- tcp_event_ack_sent(sk, tcp_skb_pcount(skb));
|
|
|
|
|
|
+ tcp_event_ack_sent(sk, tcp_skb_pcount(skb), rcv_nxt);
|
|
|
|
|
|
if (skb->len != tcp_header_size) {
|
|
if (skb->len != tcp_header_size) {
|
|
tcp_event_data_sent(tp, sk);
|
|
tcp_event_data_sent(tp, sk);
|
|
@@ -3613,12 +3617,12 @@ void __tcp_send_ack(struct sock *sk, u32 rcv_nxt)
|
|
/* Send it off, this clears delayed acks for us. */
|
|
/* Send it off, this clears delayed acks for us. */
|
|
__tcp_transmit_skb(sk, buff, 0, (__force gfp_t)0, rcv_nxt);
|
|
__tcp_transmit_skb(sk, buff, 0, (__force gfp_t)0, rcv_nxt);
|
|
}
|
|
}
|
|
|
|
+EXPORT_SYMBOL_GPL(__tcp_send_ack);
|
|
|
|
|
|
void tcp_send_ack(struct sock *sk)
|
|
void tcp_send_ack(struct sock *sk)
|
|
{
|
|
{
|
|
__tcp_send_ack(sk, tcp_sk(sk)->rcv_nxt);
|
|
__tcp_send_ack(sk, tcp_sk(sk)->rcv_nxt);
|
|
}
|
|
}
|
|
-EXPORT_SYMBOL_GPL(tcp_send_ack);
|
|
|
|
|
|
|
|
/* This routine sends a packet with an out of date sequence
|
|
/* This routine sends a packet with an out of date sequence
|
|
* number. It assumes the other end will try to ack it.
|
|
* number. It assumes the other end will try to ack it.
|