Loading...
Searching...
No Matches

Congestion control for 6LoWPAN SFR using the CongURE - A Congestion control framework. More...

Detailed Description

Congestion control for 6LoWPAN SFR using the CongURE - A Congestion control framework.

When included, this module enables congestion control for 6LoWPAN Selective Fragment Recovery (SFR). The flavor of congestion control can be selected using the following sub-modules:

Modules

 gnrc_sixlowpan_frag_sfr_congure_abe: TCP Reno with ABE
 Congestion control for SFR using the TCP Reno congestion control algorithm with ABE.
 
 gnrc_sixlowpan_frag_sfr_congure_quic: QUIC CC
 Congestion control for SFR using the congestion control algorithm of QUIC.
 
 gnrc_sixlowpan_frag_sfr_congure_reno: TCP Reno
 Congestion control for SFR using the TCP Reno congestion control algorithm.
 
 gnrc_sixlowpan_frag_sfr_congure_sfr: Appendix C
 Basic congestion control for 6LoWPAN SFR as proposed in Appendix C of RFC 8931.
 

Files

file  congure.h
 Congure definitions for 6LoWPAN selective fragment recovery.
 

Macros

#define GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT   (1U)
 The user-defined window unit for congure is one fragment with SFR.
 

Functions

congure_snd_tgnrc_sixlowpan_frag_sfr_congure_snd_get (void)
 Retrieve CongURE state object from a pool of free objects.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_free (congure_snd_t *c)
 Frees the CongURE state object.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_destroy (gnrc_sixlowpan_frag_fb_t *fb)
 Frees the CongURE state object of a fragmentation buffer and set's it to NULL
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_init (gnrc_sixlowpan_frag_fb_t *fb)
 Initializes a CongURE state object in a fragmentation buffer entry.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_setup (gnrc_sixlowpan_frag_fb_t *fb)
 Retrieve CongURE state object when not retrieved and initialize it for a fragmentation buffer entry.
 
static bool gnrc_sixlowpan_frag_sfr_congure_snd_in_cwnd (gnrc_sixlowpan_frag_fb_t *fb)
 Checks if given fragmentation buffer entry is within congestion window.
 
static bool gnrc_sixlowpan_frag_sfr_congure_snd_next_in_cwnd (gnrc_sixlowpan_frag_fb_t *fb)
 Checks if given fragmentation buffer entry would still be within congestion window after next send.
 
static bool gnrc_sixlowpan_frag_sfr_congure_snd_has_inter_frame_gap (void)
 Checks if inter-frame gap is provided.
 
static uint32_t gnrc_sixlowpan_frag_sfr_congure_snd_inter_frame_gap (gnrc_sixlowpan_frag_fb_t *fb)
 Returns inter-frame gap if provided by CongURE implementation.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_sent (gnrc_sixlowpan_frag_fb_t *fb)
 Report to CongURE that a fragment was sent.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_discard (gnrc_sixlowpan_frag_fb_t *fb)
 Report to CongURE that a fragment as discarded.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_timeout (gnrc_sixlowpan_frag_fb_t *fb)
 Report to CongURE that the ACK for a fragment timed out.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_lost (gnrc_sixlowpan_frag_fb_t *fb, congure_snd_msg_t *frags)
 Report to CongURE that a number of fragments are known to be lost.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_acked (gnrc_sixlowpan_frag_fb_t *fb, congure_snd_msg_t *frag, congure_snd_ack_t *ack)
 Report to CongURE that a number of fragments are known to be lost.
 
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_ecn (gnrc_sixlowpan_frag_fb_t *fb, uint32_t time)
 Report to CongURE that ECN bit was set in an ACK.
 

Macro Definition Documentation

◆ GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT

#define GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT   (1U)

The user-defined window unit for congure is one fragment with SFR.

Definition at line 46 of file congure.h.

Function Documentation

◆ gnrc_sixlowpan_frag_sfr_congure_snd_destroy()

static void gnrc_sixlowpan_frag_sfr_congure_snd_destroy ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Frees the CongURE state object of a fragmentation buffer and set's it to NULL

Parameters
[in]fbA fragmentation buffer entry
Note
Does not do anything without the module gnrc_sixlowpan_frag_sfr_congure

Definition at line 107 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_free()

static void gnrc_sixlowpan_frag_sfr_congure_snd_free ( congure_snd_t c)
inlinestatic

Frees the CongURE state object.

This makes a CongURE state object retrievable with gnrc_sixlowpan_frag_sfr_congure_snd_get again.

Precondition
CongURE object is not NULL when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]cA CongURE state object
Note
Does not do anything without the module gnrc_sixlowpan_frag_sfr_congure

Definition at line 89 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_get()

congure_snd_t * gnrc_sixlowpan_frag_sfr_congure_snd_get ( void  )

Retrieve CongURE state object from a pool of free objects.

Needs to be defined in for a each CongURE implementation congure_x e.g. as a sub-module gnrc_sixlowpan_frag_sfr_congure_x and call the respective congure_x_snd_setup function when a free object is available for that object. As such, congure_snd_t::driver == NULL can be used as an identifier if a state object is free.

The pool of objects has to have an initial size of at least CONFIG_GNRC_SIXLOWPAN_FRAG_FB_SIZE.

The window unit is GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT.

Returns
A CongURE state object on success
NULL, if no free CongURE state object is available (including when when module gnrc_sixlowpan_frag_sfr_congure is not included).

◆ gnrc_sixlowpan_frag_sfr_congure_snd_has_inter_frame_gap()

static bool gnrc_sixlowpan_frag_sfr_congure_snd_has_inter_frame_gap ( void  )
inlinestatic

Checks if inter-frame gap is provided.

Either because CONFIG_GNRC_SIXLOWPAN_SFR_INTER_FRAME_GAP_US is greater 0 or module gnrc_sixlowpan_frag_sfr_congure is provided

Return values
trueWhen an inter-frame gap can be provided
falseWhen the inter-frame gap is supposed to be 0.

Definition at line 220 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_in_cwnd()

static bool gnrc_sixlowpan_frag_sfr_congure_snd_in_cwnd ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Checks if given fragmentation buffer entry is within congestion window.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer entry
Note
Without the module gnrc_sixlowpan_frag_sfr_congure the fragmentation buffer entry is checked against CONFIG_GNRC_SIXLOWPAN_SFR_OPT_WIN_SIZE
Return values
trueWhen fb is in congestion window
falseWhen fb is not in congestion window

Definition at line 175 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_init()

static void gnrc_sixlowpan_frag_sfr_congure_snd_init ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Initializes a CongURE state object in a fragmentation buffer entry.

Parameters
[in]fbA fragmentation buffer entry
Note
Does not do anything without the module gnrc_sixlowpan_frag_sfr_congure

Definition at line 125 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_inter_frame_gap()

static uint32_t gnrc_sixlowpan_frag_sfr_congure_snd_inter_frame_gap ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Returns inter-frame gap if provided by CongURE implementation.

When module gnrc_sixlowpan_frag_sfr_congure is provided it will provide congure_snd_driver_t::inter_message_interval() of the CongURE state object of the provided fragmentation buffer with CONFIG_GNRC_SIXLOWPAN_SFR_INTER_FRAME_GAP_US as a lower bound. If congure_snd_driver_t::inter_message_interval returns -1, fb is NULL, or without the module gnrc_sixlowpan_frag_sfr_congure it will return CONFIG_GNRC_SIXLOWPAN_SFR_INTER_FRAME_GAP_US

Precondition
CongURE object of the fragmentation buffer entry is initialized when fb is NULL and when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer. May be NULL.
Returns
The inter-frame gap for the given fragmentation buffer, but

Definition at line 245 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_next_in_cwnd()

static bool gnrc_sixlowpan_frag_sfr_congure_snd_next_in_cwnd ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Checks if given fragmentation buffer entry would still be within congestion window after next send.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Note
Without the module gnrc_sixlowpan_frag_sfr_congure the fragmentation buffer entry is checked against CONFIG_GNRC_SIXLOWPAN_SFR_OPT_WIN_SIZE
Return values
trueWhen fb can still send one fragment under the congestion window constraint.
falseWhen fb can not still send one fragment under the congestion window constraint.

Definition at line 200 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_report_ecn()

static void gnrc_sixlowpan_frag_sfr_congure_snd_report_ecn ( gnrc_sixlowpan_frag_fb_t fb,
uint32_t  time 
)
inlinestatic

Report to CongURE that ECN bit was set in an ACK.

Calls congure_snd_driver_t::report_ecn_ce for the CongURE state object of fb with time.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer.
[in]timeTimestamp in milliseconds of the earliest fragment for which the notified congestion occurred was sent.

Definition at line 412 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_acked()

static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_acked ( gnrc_sixlowpan_frag_fb_t fb,
congure_snd_msg_t frag,
congure_snd_ack_t ack 
)
inlinestatic

Report to CongURE that a number of fragments are known to be lost.

Calls congure_snd_driver_t::report_msgs_acked for the CongURE state object of fb with frag and ack.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer.
[in]fragThe ACK'd fragment.
[in]ackThe received ACK.

Definition at line 379 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_discard()

static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_discard ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Report to CongURE that a fragment as discarded.

Calls congure_snd_driver_t::report_msg_discarded for the CongURE state object of fb with msg_size GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer.

Definition at line 302 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_sent()

static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_sent ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Report to CongURE that a fragment was sent.

Calls congure_snd_driver_t::report_msg_sent for the CongURE state object of fb with msg_size GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer.

Definition at line 278 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_lost()

static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_lost ( gnrc_sixlowpan_frag_fb_t fb,
congure_snd_msg_t frags 
)
inlinestatic

Report to CongURE that a number of fragments are known to be lost.

Calls congure_snd_driver_t::report_msgs_lost for the CongURE state object of fb with frags.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer.
[in]fragsA collection of messages that are known to be lost. The list may be changed by the function.

Definition at line 352 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_timeout()

static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_timeout ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Report to CongURE that the ACK for a fragment timed out.

Calls congure_snd_driver_t::report_msgs_timeout for the CongURE state object of fb with gnrc_sixlowpan_frag_sfr_fb_t::window of fb as msgs.

Precondition
CongURE object of the fragmentation buffer entry is initialized when called with module gnrc_sixlowpan_frag_sfr_congure used.
Parameters
[in]fbA fragmentation buffer.

Definition at line 326 of file congure.h.

◆ gnrc_sixlowpan_frag_sfr_congure_snd_setup()

static void gnrc_sixlowpan_frag_sfr_congure_snd_setup ( gnrc_sixlowpan_frag_fb_t fb)
inlinestatic

Retrieve CongURE state object when not retrieved and initialize it for a fragmentation buffer entry.

Parameters
[in]fbA fragmentation buffer entry
Note
Does not do anything without the module gnrc_sixlowpan_frag_sfr_congure

Definition at line 143 of file congure.h.