1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
16171: gnrc_sixlowpan_frag_sfr_congure: add congure_abe support r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
This commit is contained in:
bors[bot] 2023-03-01 19:48:02 +00:00 committed by GitHub
commit 2ae3383bce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 0 deletions

View File

@ -236,6 +236,14 @@ PSEUDOMODULES += gnrc_sixlowpan_frag_sfr_stats
## @{
##
PSEUDOMODULES += gnrc_sixlowpan_frag_sfr_congure
## @defgroup net_gnrc_sixlowpan_frag_sfr_congure_abe gnrc_sixlowpan_frag_sfr_congure_abe: TCP Reno with ABE
## @brief Congestion control for SFR using the [TCP Reno congestion control algorithm with ABE](@ref sys_congure_abe)
##
## Provides an Alternative Backoff with Explicit Content Notification (ABE) to TCP-Reno-based congestion
## control
## @{
PSEUDOMODULES += gnrc_sixlowpan_frag_sfr_congure_abe
## @}
## @defgroup net_gnrc_sixlowpan_frag_sfr_congure_reno gnrc_sixlowpan_frag_sfr_congure_reno: TCP Reno
## @brief Congestion control for SFR using the [TCP Reno congestion control algorithm](@ref sys_congure_reno)
## @{

View File

@ -18,6 +18,7 @@
* - @ref net_gnrc_sixlowpan_frag_sfr_congure_sfr (the default)
* - @ref net_gnrc_sixlowpan_frag_sfr_congure_quic
* - @ref net_gnrc_sixlowpan_frag_sfr_congure_reno
* - @ref net_gnrc_sixlowpan_frag_sfr_congure_abe
* @{
*
* @file

View File

@ -244,6 +244,11 @@ ifneq (,$(filter gnrc_sixlowpan_frag_sfr_congure_%,$(USEMODULE)))
USEMODULE += gnrc_sixlowpan_frag_sfr_congure
endif
ifneq (,$(filter gnrc_sixlowpan_frag_sfr_congure_abe,$(USEMODULE)))
USEMODULE += gnrc_sixlowpan_frag_sfr_congure_reno
USEMODULE += congure_abe
endif
ifneq (,$(filter gnrc_sixlowpan_frag_sfr_congure_quic,$(USEMODULE)))
USEMODULE += congure_quic
endif

View File

@ -14,12 +14,17 @@
*/
#include "kernel_defines.h"
#include "congure/abe.h"
#include "congure/reno.h"
#include "net/gnrc/sixlowpan/config.h"
#include "net/gnrc/sixlowpan/frag/sfr/congure.h"
#if IS_USED(MODULE_CONGURE_ABE)
typedef congure_abe_snd_t _sfr_congure_snd_t;
#else
typedef congure_reno_snd_t _sfr_congure_snd_t;
#endif
#define SFR_CONGURE_RENO_CONSTS { \
.fr = _fr, \
@ -36,14 +41,27 @@ static void _fr(congure_reno_snd_t *c);
static bool _same_wnd_adv(congure_reno_snd_t *c, congure_snd_ack_t *ack);
static _sfr_congure_snd_t _sfr_congures[CONFIG_GNRC_SIXLOWPAN_FRAG_FB_SIZE];
#if IS_USED(MODULE_CONGURE_ABE)
static const congure_abe_snd_consts_t _sfr_congure_abe_consts = {
.reno = SFR_CONGURE_RENO_CONSTS,
.abe_multiplier_numerator = CONFIG_CONGURE_ABE_MULTIPLIER_NUMERATOR_DEFAULT,
.abe_multiplier_denominator = CONFIG_CONGURE_ABE_MULTIPLIER_DENOMINATOR_DEFAULT,
};
#else
static const congure_reno_snd_consts_t _sfr_congure_reno_consts = SFR_CONGURE_RENO_CONSTS;
#endif
congure_snd_t *gnrc_sixlowpan_frag_sfr_congure_snd_get(void)
{
for (unsigned i = 0; i < ARRAY_SIZE(_sfr_congures); i++) {
if (_sfr_congures[i].super.driver == NULL) {
#if IS_USED(MODULE_CONGURE_ABE)
congure_abe_snd_setup(&_sfr_congures[i],
&_sfr_congure_abe_consts);
#else
congure_reno_snd_setup(&_sfr_congures[i],
&_sfr_congure_reno_consts);
#endif
return &_sfr_congures[i].super;
}
}

View File

@ -30,6 +30,9 @@ endif
CONGURE_IMPL ?= congure_sfr
ifeq (congure_abe,$(CONGURE_IMPL))
USEMODULE += gnrc_sixlowpan_frag_sfr_congure_abe
else
ifeq (congure_quic,$(CONGURE_IMPL))
USEMODULE += gnrc_sixlowpan_frag_sfr_congure_quic
USEMODULE += ztimer_msec
@ -44,6 +47,7 @@ else
endif
endif
endif
endif
.PHONY: zep_dispatch