Skip to content

Commit

Permalink
tcp: remove DELAYED ACK events in DCTCP
Browse files Browse the repository at this point in the history
After fixing the way DCTCP tracking delayed ACKs, the delayed-ACK
related callbacks are no longer needed

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yuchung Cheng authored and David S. Miller committed Jul 14, 2018
1 parent b0c05d0 commit a69258f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
2 changes: 0 additions & 2 deletions include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,6 @@ enum tcp_ca_event {
CA_EVENT_LOSS, /* loss timeout */
CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */
CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */
CA_EVENT_DELAYED_ACK, /* Delayed ack is sent */
CA_EVENT_NON_DELAYED_ACK,
};

/* Information about inbound ACK, passed to cong_ops->in_ack_event() */
Expand Down
25 changes: 0 additions & 25 deletions net/ipv4/tcp_dctcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ struct dctcp {
u32 dctcp_alpha;
u32 next_seq;
u32 ce_state;
u32 delayed_ack_reserved;
u32 loss_cwnd;
};

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

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

ca->delayed_ack_reserved = 0;
ca->loss_cwnd = 0;
ca->ce_state = 0;

Expand Down Expand Up @@ -250,25 +248,6 @@ static void dctcp_state(struct sock *sk, u8 new_state)
}
}

static void dctcp_update_ack_reserved(struct sock *sk, enum tcp_ca_event ev)
{
struct dctcp *ca = inet_csk_ca(sk);

switch (ev) {
case CA_EVENT_DELAYED_ACK:
if (!ca->delayed_ack_reserved)
ca->delayed_ack_reserved = 1;
break;
case CA_EVENT_NON_DELAYED_ACK:
if (ca->delayed_ack_reserved)
ca->delayed_ack_reserved = 0;
break;
default:
/* Don't care for the rest. */
break;
}
}

static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
{
switch (ev) {
Expand All @@ -278,10 +257,6 @@ static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
case CA_EVENT_ECN_NO_CE:
dctcp_ce_state_1_to_0(sk);
break;
case CA_EVENT_DELAYED_ACK:
case CA_EVENT_NON_DELAYED_ACK:
dctcp_update_ack_reserved(sk, ev);
break;
default:
/* Don't care for the rest. */
break;
Expand Down
4 changes: 0 additions & 4 deletions net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -3523,8 +3523,6 @@ void tcp_send_delayed_ack(struct sock *sk)
int ato = icsk->icsk_ack.ato;
unsigned long timeout;

tcp_ca_event(sk, CA_EVENT_DELAYED_ACK);

if (ato > TCP_DELACK_MIN) {
const struct tcp_sock *tp = tcp_sk(sk);
int max_ato = HZ / 2;
Expand Down Expand Up @@ -3581,8 +3579,6 @@ void tcp_send_ack(struct sock *sk)
if (sk->sk_state == TCP_CLOSE)
return;

tcp_ca_event(sk, CA_EVENT_NON_DELAYED_ACK);

/* We are not putting this on the write queue, so
* tcp_transmit_skb() will set the ownership to this
* sock.
Expand Down

0 comments on commit a69258f

Please sign in to comment.