Skip to content

Commit faa0474

Browse files
yuchungchengZhengShunQian
authored andcommitted
tcp: remove DELAYED ACK events in DCTCP
[ Upstream commit a69258f ] After fixing the way DCTCP tracking delayed ACKs, the delayed-ACK related callbacks are no longer needed Signed-off-by: Yuchung Cheng <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Neal Cardwell <[email protected]> Acked-by: Lawrence Brakmo <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6e32c29 commit faa0474

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

include/net/tcp.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,6 @@ enum tcp_ca_event {
822822
CA_EVENT_LOSS, /* loss timeout */
823823
CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */
824824
CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */
825-
CA_EVENT_DELAYED_ACK, /* Delayed ack is sent */
826-
CA_EVENT_NON_DELAYED_ACK,
827825
};
828826

829827
/* Information about inbound ACK, passed to cong_ops->in_ack_event() */

net/ipv4/tcp_dctcp.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ struct dctcp {
5555
u32 dctcp_alpha;
5656
u32 next_seq;
5757
u32 ce_state;
58-
u32 delayed_ack_reserved;
5958
u32 loss_cwnd;
6059
};
6160

@@ -96,7 +95,6 @@ static void dctcp_init(struct sock *sk)
9695

9796
ca->dctcp_alpha = min(dctcp_alpha_on_init, DCTCP_MAX_ALPHA);
9897

99-
ca->delayed_ack_reserved = 0;
10098
ca->loss_cwnd = 0;
10199
ca->ce_state = 0;
102100

@@ -230,25 +228,6 @@ static void dctcp_state(struct sock *sk, u8 new_state)
230228
}
231229
}
232230

233-
static void dctcp_update_ack_reserved(struct sock *sk, enum tcp_ca_event ev)
234-
{
235-
struct dctcp *ca = inet_csk_ca(sk);
236-
237-
switch (ev) {
238-
case CA_EVENT_DELAYED_ACK:
239-
if (!ca->delayed_ack_reserved)
240-
ca->delayed_ack_reserved = 1;
241-
break;
242-
case CA_EVENT_NON_DELAYED_ACK:
243-
if (ca->delayed_ack_reserved)
244-
ca->delayed_ack_reserved = 0;
245-
break;
246-
default:
247-
/* Don't care for the rest. */
248-
break;
249-
}
250-
}
251-
252231
static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
253232
{
254233
switch (ev) {
@@ -258,10 +237,6 @@ static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
258237
case CA_EVENT_ECN_NO_CE:
259238
dctcp_ce_state_1_to_0(sk);
260239
break;
261-
case CA_EVENT_DELAYED_ACK:
262-
case CA_EVENT_NON_DELAYED_ACK:
263-
dctcp_update_ack_reserved(sk, ev);
264-
break;
265240
default:
266241
/* Don't care for the rest. */
267242
break;

net/ipv4/tcp_output.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3316,8 +3316,6 @@ void tcp_send_delayed_ack(struct sock *sk)
33163316
int ato = icsk->icsk_ack.ato;
33173317
unsigned long timeout;
33183318

3319-
tcp_ca_event(sk, CA_EVENT_DELAYED_ACK);
3320-
33213319
if (ato > TCP_DELACK_MIN) {
33223320
const struct tcp_sock *tp = tcp_sk(sk);
33233321
int max_ato = HZ / 2;
@@ -3374,8 +3372,6 @@ void __tcp_send_ack(struct sock *sk, u32 rcv_nxt)
33743372
if (sk->sk_state == TCP_CLOSE)
33753373
return;
33763374

3377-
tcp_ca_event(sk, CA_EVENT_NON_DELAYED_ACK);
3378-
33793375
/* We are not putting this on the write queue, so
33803376
* tcp_transmit_skb() will set the ownership to this
33813377
* sock.

0 commit comments

Comments
 (0)