Skip to content

Commit 0cc52d6

Browse files
edumazetZhengShunQian
authored andcommitted
tcp: do not aggressively quick ack after ECN events
[ Upstream commit 522040e ] ECN signals currently forces TCP to enter quickack mode for up to 16 (TCP_MAX_QUICKACKS) following incoming packets. We believe this is not needed, and only sending one immediate ack for the current packet should be enough. This should reduce the extra load noticed in DCTCP environments, after congestion events. This is part 2 of our effort to reduce pure ACK packets. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Acked-by: Yuchung Cheng <[email protected]> Acked-by: Neal Cardwell <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 08bcf03 commit 0cc52d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/tcp_input.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ static void __tcp_ecn_check_ce(struct tcp_sock *tp, const struct sk_buff *skb)
238238
* it is probably a retransmit.
239239
*/
240240
if (tp->ecn_flags & TCP_ECN_SEEN)
241-
tcp_enter_quickack_mode((struct sock *)tp, TCP_MAX_QUICKACKS);
241+
tcp_enter_quickack_mode((struct sock *)tp, 1);
242242
break;
243243
case INET_ECN_CE:
244244
if (tcp_ca_needs_ecn((struct sock *)tp))
245245
tcp_ca_event((struct sock *)tp, CA_EVENT_ECN_IS_CE);
246246

247247
if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) {
248248
/* Better not delay acks, sender can have a very low cwnd */
249-
tcp_enter_quickack_mode((struct sock *)tp, TCP_MAX_QUICKACKS);
249+
tcp_enter_quickack_mode((struct sock *)tp, 1);
250250
tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
251251
}
252252
tp->ecn_flags |= TCP_ECN_SEEN;

0 commit comments

Comments
 (0)