Standard TCP is ACK-clocked, or in other words it must wait for ACKs after sending a full window size bytes. However, in some particular cases, a congestion control would like to be able to tell the TCP implementation when it is possible to send segments through a timer. This patch adds the interface (completely optional) between a congestion control and the TCP implementation.
Signed-off-by: Natale Patriciello <natale.patricie...@gmail.com> Tested-by: Ahmed Said <ahmed.s...@uniroma2.it> --- include/net/tcp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/net/tcp.h b/include/net/tcp.h index be6223c586fa..bf661ccc53a2 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -939,6 +939,14 @@ struct tcp_congestion_ops { /* get info for inet_diag (optional) */ size_t (*get_info)(struct sock *sk, u32 ext, int *attr, union tcp_cc_info *info); + /* get the expiration time for the send timer (optional) */ + unsigned long (*get_send_timer_exp_time)(struct sock *sk); + /* no data to transmit at the timer expiration (optional) */ + void (*no_data_to_transmit)(struct sock *sk); + /* the send timer is expired (optional) */ + void (*send_timer_expired)(struct sock *sk); + /* the TCP has sent some segments (optional) */ + void (*segment_sent)(struct sock *sk, u32 sent); char name[TCP_CA_NAME_MAX]; struct module *owner; -- 2.13.2