summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-07-03 17:47:22 -0700
committerDamjan Marion <dmarion@me.com>2019-07-05 11:58:34 +0000
commita3c3265b20c2a382656957b4afd2003bddccd9bb (patch)
tree3b45bd4faca1ab99ecf9d45573359d3fbc6d266a /src/vnet/tcp/tcp.h
parentba6abfa0629f04830cc4908a93101ac4ce3bd474 (diff)
tcp: add loss signal to cc algo
Type:feature Change-Id: Ibe1a4c555b55fb929d55b02599aaf099ed522cdf Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r--src/vnet/tcp/tcp.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 8b943cdd5b5..2bc6f22ba83 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -379,13 +379,14 @@ struct _tcp_cc_algorithm
{
const char *name;
uword (*unformat_cfg) (unformat_input_t * input);
+ void (*init) (tcp_connection_t * tc);
+ void (*cleanup) (tcp_connection_t * tc);
void (*rcv_ack) (tcp_connection_t * tc, tcp_rate_sample_t *rs);
void (*rcv_cong_ack) (tcp_connection_t * tc, tcp_cc_ack_t ack,
tcp_rate_sample_t *rs);
void (*congestion) (tcp_connection_t * tc);
+ void (*loss) (tcp_connection_t * tc);
void (*recovered) (tcp_connection_t * tc);
- void (*init) (tcp_connection_t * tc);
- void (*cleanup) (tcp_connection_t * tc);
};
/* *INDENT-ON* */
@@ -900,7 +901,7 @@ int tcp_fast_retransmit_sack (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
int tcp_fast_retransmit (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
u32 burst_size);
void tcp_cc_init_congestion (tcp_connection_t * tc);
-void tcp_cc_fastrecovery_exit (tcp_connection_t * tc);
+void tcp_cc_fastrecovery_clear (tcp_connection_t * tc);
fib_node_index_t tcp_lookup_rmt_in_fib (tcp_connection_t * tc);
@@ -958,6 +959,12 @@ tcp_cc_rcv_cong_ack (tcp_connection_t * tc, tcp_cc_ack_t ack_type,
tc->cc_algo->rcv_cong_ack (tc, ack_type, rs);
}
+static inline void
+tcp_cc_loss (tcp_connection_t * tc)
+{
+ tc->cc_algo->loss (tc);
+}
+
always_inline void
tcp_timer_set (tcp_connection_t * tc, u8 timer_id, u32 interval)
{