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);
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* */
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)
{
if (tc->flags & TCP_CONN_RATE_SAMPLE)
tc->flags |= TCP_CONN_TRACK_BURST;
+
+ if (tc->snd_una == tc->snd_nxt)
+ tcp_cc_event (tc, TCP_CC_EVT_START_TX);
}
void