diff options
author | Florian Westphal <fw@strlen.de> | 2014-09-26 16:37:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-29 00:13:10 -0400 |
commit | 7354c8c389d18719dd71cc810da70b0921d66694 (patch) | |
tree | 776fa6ce824557d0c8bbf4271ad3b08a4832a66f /include/net/tcp.h | |
parent | 30e502a34b8b21fae2c789da102bd9f6e99fef83 (diff) |
net: tcp: split ack slow/fast events from cwnd_event
The congestion control ops "cwnd_event" currently supports
CA_EVENT_FAST_ACK and CA_EVENT_SLOW_ACK events (among others).
Both FAST and SLOW_ACK are only used by Westwood congestion
control algorithm.
This removes both flags from cwnd_event and adds a new
in_ack_event callback for this. The goal is to be able to
provide more detailed information about ACKs, such as whether
ECE flag was set, or whether the ACK resulted in a window
update.
It is required for DataCenter TCP (DCTCP) congestion control
algorithm as it makes a different choice depending on ECE being
set or not.
Joint work with Daniel Borkmann and Glenn Judd.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Glenn Judd <glenn.judd@morganstanley.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index a12f145cfbc3..7ec6a28305c0 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -763,8 +763,10 @@ enum tcp_ca_event { | |||
763 | CA_EVENT_CWND_RESTART, /* congestion window restart */ | 763 | CA_EVENT_CWND_RESTART, /* congestion window restart */ |
764 | CA_EVENT_COMPLETE_CWR, /* end of congestion recovery */ | 764 | CA_EVENT_COMPLETE_CWR, /* end of congestion recovery */ |
765 | CA_EVENT_LOSS, /* loss timeout */ | 765 | CA_EVENT_LOSS, /* loss timeout */ |
766 | CA_EVENT_FAST_ACK, /* in sequence ack */ | 766 | }; |
767 | CA_EVENT_SLOW_ACK, /* other ack */ | 767 | |
768 | enum tcp_ca_ack_event_flags { | ||
769 | CA_ACK_SLOWPATH = (1 << 0), | ||
768 | }; | 770 | }; |
769 | 771 | ||
770 | /* | 772 | /* |
@@ -796,6 +798,8 @@ struct tcp_congestion_ops { | |||
796 | void (*set_state)(struct sock *sk, u8 new_state); | 798 | void (*set_state)(struct sock *sk, u8 new_state); |
797 | /* call when cwnd event occurs (optional) */ | 799 | /* call when cwnd event occurs (optional) */ |
798 | void (*cwnd_event)(struct sock *sk, enum tcp_ca_event ev); | 800 | void (*cwnd_event)(struct sock *sk, enum tcp_ca_event ev); |
801 | /* call when ack arrives (optional) */ | ||
802 | void (*in_ack_event)(struct sock *sk, u32 flags); | ||
799 | /* new value of cwnd after loss (optional) */ | 803 | /* new value of cwnd after loss (optional) */ |
800 | u32 (*undo_cwnd)(struct sock *sk); | 804 | u32 (*undo_cwnd)(struct sock *sk); |
801 | /* hook for packet ack accounting (optional) */ | 805 | /* hook for packet ack accounting (optional) */ |