void (*congestion) (tcp_connection_t * tc);
void (*loss) (tcp_connection_t * tc);
void (*recovered) (tcp_connection_t * tc);
+ void (*undo_recovery) (tcp_connection_t * tc);
};
/* *INDENT-ON* */
tc->cc_algo->loss (tc);
}
+static inline void
+tcp_cc_recovered (tcp_connection_t * tc)
+{
+ tc->cc_algo->recovered (tc);
+}
+
+static inline void
+tcp_cc_undo_recovery (tcp_connection_t * tc)
+{
+ if (tc->cc_algo->undo_recovery)
+ tc->cc_algo->undo_recovery (tc);
+}
+
always_inline void
tcp_timer_set (tcp_connection_t * tc, u8 timer_id, u32 interval)
{
TCP_EVT_DBG (TCP_EVT_CC_EVT, tc, 3);
}
-static inline void
-tcp_cc_fastrecovery_clear_inline (tcp_connection_t * tc)
+#ifndef CLIB_MARCH_VARIANT
+void
+tcp_cc_fastrecovery_clear (tcp_connection_t * tc)
{
tc->snd_rxt_bytes = 0;
tc->rcv_dupacks = 0;
TCP_EVT_DBG (TCP_EVT_CC_EVT, tc, 3);
}
-
-static void
-tcp_cc_fastrecovery_exit (tcp_connection_t * tc)
-{
- tc->cc_algo->recovered (tc);
- tcp_cc_fastrecovery_clear_inline (tc);
-}
-
-#ifndef CLIB_MARCH_VARIANT
-void
-tcp_cc_fastrecovery_clear (tcp_connection_t * tc)
-{
- tcp_cc_fastrecovery_clear_inline (tc);
-}
#endif /* CLIB_MARCH_VARIANT */
static void
}
else if (tcp_in_fastrecovery (tc))
{
- tcp_cc_fastrecovery_exit (tc);
+ tcp_cc_fastrecovery_clear (tc);
}
+ tcp_cc_undo_recovery (tc);
ASSERT (tc->rto_boff == 0);
TCP_EVT_DBG (TCP_EVT_CC_EVT, tc, 5);
}
if (tcp_in_recovery (tc))
tcp_cc_recovery_exit (tc);
else if (tcp_in_fastrecovery (tc))
- tcp_cc_fastrecovery_exit (tc);
+ {
+ tcp_cc_recovered (tc);
+ tcp_cc_fastrecovery_clear (tc);
+ }
ASSERT (tc->rto_boff == 0);
ASSERT (!tcp_in_cong_recovery (tc));