diff --git a/sys/congure/reno/congure_reno.c b/sys/congure/reno/congure_reno.c index 2a1146572f09..49db20aec672 100644 --- a/sys/congure/reno/congure_reno.c +++ b/sys/congure/reno/congure_reno.c @@ -20,8 +20,8 @@ static const congure_snd_driver_t _driver = { .inter_msg_interval = congure_reno_snd_inter_msg_interval, .report_msg_sent = congure_reno_snd_report_msg_sent, .report_msg_discarded = congure_reno_snd_report_msg_discarded, - .report_msg_timeout = congure_reno_snd_report_msg_timeout, - .report_msg_lost = congure_reno_snd_report_msg_lost, + .report_msgs_timeout = congure_reno_snd_report_msgs_timeout, + .report_msgs_lost = congure_reno_snd_report_msgs_lost, .report_msg_acked = congure_reno_snd_report_msg_acked, .report_ecn_ce = congure_reno_snd_report_ecn_ce, }; diff --git a/sys/congure/reno/methods/congure_reno_methods.c b/sys/congure/reno/methods/congure_reno_methods.c index 3537b3fc4420..984e1d51be8b 100644 --- a/sys/congure/reno/methods/congure_reno_methods.c +++ b/sys/congure/reno/methods/congure_reno_methods.c @@ -64,7 +64,7 @@ static void _enforce_fast_retransmit(congure_reno_snd_t *c) c->consts->fr(c); } -void congure_reno_set_mss(congure_reno_snd_t *c, unsigned mss) +void congure_reno_set_mss(congure_reno_snd_t *c, congure_wnd_size_t mss) { c->mss = mss; c->super.cwnd = _calc_init_wnd(c); @@ -120,8 +120,8 @@ int _check_resends(clist_node_t *node, void *ctx) return 0; } -void congure_reno_snd_report_msg_timeout(congure_snd_t *cong, - congure_snd_msg_t *msgs) +void congure_reno_snd_report_msgs_timeout(congure_snd_t *cong, + congure_snd_msg_t *msgs) { congure_reno_snd_t *c = (congure_reno_snd_t *)cong; @@ -149,8 +149,8 @@ int _mark_msg_lost(clist_node_t *node, void *ctx) return 0; } -void congure_reno_snd_report_msg_lost(congure_snd_t *cong, - congure_snd_msg_t *msgs) +void congure_reno_snd_report_msgs_lost(congure_snd_t *cong, + congure_snd_msg_t *msgs) { congure_reno_snd_t *c = (congure_reno_snd_t *)cong; diff --git a/sys/include/congure/reno.h b/sys/include/congure/reno.h index 5bea9d13c8d5..6e3be0276ca2 100644 --- a/sys/include/congure/reno.h +++ b/sys/include/congure/reno.h @@ -176,11 +176,11 @@ struct congure_reno_snd { * @brief Constants */ const congure_reno_snd_consts_t *consts; + uint32_t last_ack; /**< ID of the last ACK reported */ /** * @brief Maximum segment size of the sender in caller-defined units */ - unsigned mss; - uint32_t last_ack; /**< ID of the last ACK reported */ + congure_wnd_size_t mss; congure_wnd_size_t ssthresh; /**< Slow-start threshold */ /** * @brief Sum of caller-defined units of message sizes of all messages @@ -203,6 +203,18 @@ struct congure_reno_snd { void congure_reno_snd_setup(congure_reno_snd_t *c, const congure_reno_snd_consts_t *consts); +/** + * @defgroup sys_congure_reno_methods The send driver methods for CongURE TCP Reno + * @ingroup sys_congure_reno + * + * Many other congestion control mechanisms are just adaptations of TCP Reno, + * so this makes the methods of @ref sys_congure_reno available to other + * @ref sys_congure modules. Use module `congure_reno_methods` to only compile + * in these methods, but not the driver for `congure_reno_snd_t` or + * @ref congure_reno_snd_setup(). + * + * @{ + */ /** * @brief Set sender maximum segment size. * @@ -212,18 +224,8 @@ void congure_reno_snd_setup(congure_reno_snd_t *c, * @param[in] c A CongURE state object * @param[in] mss Maximum segment size of the sender in caller-defined units */ -void congure_reno_set_mss(congure_reno_snd_t *c, unsigned mss); +void congure_reno_set_mss(congure_reno_snd_t *c, congure_wnd_size_t mss); -/** - * @defgroup sys_congure_reno_methods The send driver methods for CongURE TCP Reno - * @ingroup sys_congure_reno - * - * Many other congestion control mechanisms are just adaptations of TCP Reno, - * so this makes the methods of @ref sys_congure_reno available to other - * @ref sys_congure modules - * - * @{ - */ /** * @brief Use to override congure_snd_driver_t::init * @@ -263,24 +265,24 @@ void congure_reno_snd_report_msg_sent(congure_snd_t *c, unsigned msg_size); void congure_reno_snd_report_msg_discarded(congure_snd_t *c, unsigned msg_size); /** - * @brief Use to override congure_snd_driver_t::report_msg_timeout + * @brief Use to override congure_snd_driver_t::report_msgs_timeout * * @param[in] c The CongURE state object. * @param[in] msgs A collection of messages that are known to be lost. - * The list may be changed by the method. + * The list must not be changed by the method. */ -void congure_reno_snd_report_msg_timeout(congure_snd_t *c, - congure_snd_msg_t *msgs); +void congure_reno_snd_report_msgs_timeout(congure_snd_t *c, + congure_snd_msg_t *msgs); /** - * @brief Use to override congure_snd_driver_t::report_msg_lost + * @brief Use to override congure_snd_driver_t::report_msgs_lost * * @param[in] c The CongURE state object. * @param[in] msgs A collection of messages for which the ACK timed - * out. The list may be changed by the method. + * out. The list must not be changed by the method. */ -void congure_reno_snd_report_msg_lost(congure_snd_t *c, - congure_snd_msg_t *msgs); +void congure_reno_snd_report_msgs_lost(congure_snd_t *c, + congure_snd_msg_t *msgs); /** * @brief Use to override congure_snd_driver_t::report_msg_acked