-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc/sixlowpan: migrate to ztimer_msec #19067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c8c7887
5a0cf39
3d95e07
70488a2
bc813ea
c0384b8
94349f4
66a5b38
4580327
1ddab5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -81,12 +81,29 @@ extern "C" { | |||||
#endif | ||||||
|
||||||
/** | ||||||
* @brief Timeout for reassembly buffer entries in microseconds | ||||||
* @brief Timeout for reassembly buffer entries in milliseconds | ||||||
* | ||||||
* @note Only applicable with | ||||||
* [gnrc_sixlowpan_frag_rb](@ref net_gnrc_sixlowpan_frag_rb) module | ||||||
*/ | ||||||
#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_MS | ||||||
#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_MS (3U) | ||||||
#else | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_MS (CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US / US_PER_SEC) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#endif | ||||||
#endif | ||||||
|
||||||
/** | ||||||
* @brief Timeout for reassembly buffer entries in microseconds | ||||||
* | ||||||
* @note Only applicable with | ||||||
* [gnrc_sixlowpan_frag_rb](@ref net_gnrc_sixlowpan_frag_rb) module | ||||||
* | ||||||
* @deprecated Use @ref CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_MS instead. | ||||||
* Will be removed after 2023.01 release. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The usual deprecation cycle is two releases, since the 2023.01 release is just up ahead, I think, 2023.07 is the better release to deprecate. This way users still have some time to adjust ;-). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ping? |
||||||
*/ | ||||||
#ifdef DOXYGEN | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US (3U * US_PER_SEC) | ||||||
#endif | ||||||
|
||||||
|
@@ -99,7 +116,7 @@ extern "C" { | |||||
* When not set, it will cause the reassembly buffer to override the oldest | ||||||
* entry when a fragment for a new datagram is received. When set, only the | ||||||
* oldest entry that is older than @ref | ||||||
* CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US will be overwritten (they will | ||||||
* CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_MS will be overwritten (they will | ||||||
* still timeout normally if reassembly buffer is not full). | ||||||
*/ | ||||||
#ifdef DOXYGEN | ||||||
|
@@ -112,13 +129,30 @@ extern "C" { | |||||
* @note Only applicable with | ||||||
* [gnrc_sixlowpan_frag_rb](@ref net_gnrc_sixlowpan_frag_rb) module | ||||||
* | ||||||
* @deprecated Use @ref CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER_MS instead. | ||||||
* Will be removed after 2023.01 release. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||||||
*/ | ||||||
#ifdef DOXYGEN | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER (0U) | ||||||
#endif | ||||||
|
||||||
/** | ||||||
* @brief Deletion timer for reassembly buffer entries in milliseconds | ||||||
* | ||||||
* @note Only applicable with | ||||||
* [gnrc_sixlowpan_frag_rb](@ref net_gnrc_sixlowpan_frag_rb) module | ||||||
* | ||||||
* Time to pass between completion of a datagram and the deletion of its | ||||||
* reassembly buffer entry. If this value is 0, the entry is dropped | ||||||
* immediately. Use this value to prevent re-creation of a reassembly buffer | ||||||
* entry on late arriving link-layer duplicates. | ||||||
*/ | ||||||
#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER_MS | ||||||
#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER (0U) | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER_MS (0U) | ||||||
#else | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER_MS (CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_DEL_TIMER / US_PER_MS) | ||||||
#endif | ||||||
#endif | ||||||
|
||||||
/** | ||||||
|
@@ -154,14 +188,33 @@ extern "C" { | |||||
#endif /* CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_SIZE */ | ||||||
|
||||||
/** | ||||||
* @brief Timeout for a VRB entry in microseconds | ||||||
* @brief Timeout for a VRB entry in milliseconds | ||||||
* | ||||||
* @see https://tools.ietf.org/html/draft-ietf-lwig-6lowpan-virtual-reassembly-01 | ||||||
* | ||||||
* @note Only applicable with | ||||||
* [gnrc_sixlowpan_frag_vrb](@ref net_gnrc_sixlowpan_frag_vrb) module. | ||||||
*/ | ||||||
#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_MS | ||||||
#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_MS (CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_MS) | ||||||
#else | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_MS (CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US / US_PER_MS) | ||||||
#endif | ||||||
#endif /* CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_MS */ | ||||||
|
||||||
/** | ||||||
* @brief Timeout for a VRB entry in microseconds | ||||||
* | ||||||
* @see https://tools.ietf.org/html/draft-ietf-lwig-6lowpan-virtual 1E79 -reassembly-01 | ||||||
* | ||||||
* @note Only applicable with | ||||||
* [gnrc_sixlowpan_frag_vrb](@ref net_gnrc_sixlowpan_frag_vrb) module. | ||||||
* | ||||||
* @deprecated Use @ref CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_MS instead. | ||||||
* Will be removed after 2023.01 release. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here. |
||||||
*/ | ||||||
#ifdef DOXYGEN | ||||||
#define CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US (CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US) | ||||||
#endif /* CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US */ | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ | |
#include "evtimer_msg.h" | ||
#include "modules.h" | ||
#include "msg.h" | ||
#include "xtimer.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
|
@@ -52,7 +51,7 @@ typedef struct gnrc_sixlowpan_frag_sfr_fb { | |
* @brief Acknowledgment request timeout event | ||
*/ | ||
evtimer_msg_event_t arq_timeout_event; | ||
uint32_t arq_timeout; /**< Time in microseconds the sender should | ||
uint32_t arq_timeout; /**< Time in milliseconds the sender should | ||
* wait for an RFRAG Acknowledgment */ | ||
uint8_t cur_seq; /**< Sequence number for next fragment */ | ||
uint8_t frags_sent; /**< Number of fragments sent */ | ||
10000
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old default was "(3U * US_PER_SEC) " -> 3000 ms or 3 seconds