summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r--src/vnet/tcp/tcp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index f2626af9da8..c83e7dced1e 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -288,6 +288,11 @@ typedef enum _tcp_cc_ack_t
TCP_CC_PARTIALACK
} tcp_cc_ack_t;
+typedef enum tcp_cc_event_
+{
+ TCP_CC_EVT_START_TX,
+} tcp_cc_event_t;
+
typedef struct _tcp_connection
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -388,6 +393,7 @@ struct _tcp_cc_algorithm
void (*loss) (tcp_connection_t * tc);
void (*recovered) (tcp_connection_t * tc);
void (*undo_recovery) (tcp_connection_t * tc);
+ void (*event) (tcp_connection_t *tc, tcp_cc_event_t evt);
};
/* *INDENT-ON* */
@@ -979,6 +985,13 @@ tcp_cc_undo_recovery (tcp_connection_t * tc)
tc->cc_algo->undo_recovery (tc);
}
+static inline void
+tcp_cc_event (tcp_connection_t * tc, tcp_cc_event_t evt)
+{
+ if (tc->cc_algo->event)
+ tc->cc_algo->event (tc, evt);
+}
+
always_inline void
tcp_timer_set (tcp_connection_t * tc, u8 timer_id, u32 interval)
{