Skip to content

Commit

Permalink
Merge pull request RIOT-OS#13129 from PeterKietzmann/pr_sixlowpan_agg…
Browse files Browse the repository at this point in the history
…r_override

gnrc/sixlowpan: add deprecation note for GNRC_SIXLOWPAN_FRAG_RBUF_AGGRESSIVE_OVERRIDE
  • Loading branch information
miri64 authored Jan 16, 2020
2 parents 22db0d9 + c7b6dc5 commit 97a71bc
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion sys/include/net/gnrc/sixlowpan/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef NET_GNRC_SIXLOWPAN_CONFIG_H
#define NET_GNRC_SIXLOWPAN_CONFIG_H

#include "kernel_defines.h"
#include "timex.h"

#ifdef __cplusplus
Expand Down Expand Up @@ -81,6 +82,22 @@ extern "C" {
#define GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US (3U * US_PER_SEC)
#endif

/**
* @brief Keep all but oldest fragment when reassembly buffer is full
*
* @note Only applicable with
* [gnrc_sixlowpan_frag_rb](@ref net_gnrc_sixlowpan_frag_rb) module
*
* When not set, it will cause the reassembly buffer to override the oldest entry
* if a new entry has to be created and the reassembly buffer is full, no matter what.
* When set to 1, only incomplete entries that are older than
* @ref GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US will be overwritten (they will still timeout
* normally).
*/
#ifdef DOXYGEN
#define GNRC_SIXLOWPAN_FRAG_RBUF_DO_NOT_OVERRIDE
#endif

/**
* @brief Aggressively override reassembly buffer when full
*
Expand All @@ -92,10 +109,17 @@ extern "C" {
* entry that is older than @ref GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US will be
* overwritten (they will still timeout normally if reassembly buffer is not
* full).
*
* @deprecated Use inverse @ref GNRC_SIXLOWPAN_FRAG_RBUF_DO_NOT_OVERRIDE instead.
* Will be removed after 2020.10 release.
*/
#ifndef GNRC_SIXLOWPAN_FRAG_RBUF_AGGRESSIVE_OVERRIDE
#if IS_ACTIVE(GNRC_SIXLOWPAN_FRAG_RBUF_DO_NOT_OVERRIDE)
#define GNRC_SIXLOWPAN_FRAG_RBUF_AGGRESSIVE_OVERRIDE (0)
#else /* GNRC_SIXLOWPAN_FRAG_RBUF_DO_NOT_OVERRIDE */
#define GNRC_SIXLOWPAN_FRAG_RBUF_AGGRESSIVE_OVERRIDE (1)
#endif
#endif /* GNRC_SIXLOWPAN_FRAG_RBUF_DO_NOT_OVERRIDE */
#endif /* GNRC_SIXLOWPAN_FRAG_RBUF_AGGRESSIVE_OVERRIDE */

/**
* @brief Deletion timer for reassembly buffer entries in microseconds
Expand Down

0 comments on commit 97a71bc

Please sign in to comment.