diff --git a/sys/include/net/gnrc/udp.h b/sys/include/net/gnrc/udp.h index 2b19e98876..37528d87e8 100644 --- a/sys/include/net/gnrc/udp.h +++ b/sys/include/net/gnrc/udp.h @@ -33,10 +33,19 @@ extern "C" { #endif /** - * @brief Default message queue size for the UDP thread + * @defgroup net_gnrc_udp_conf GNRC UDP compile configurations + * @ingroup net_gnrc_conf + * @{ */ -#ifndef GNRC_UDP_MSG_QUEUE_SIZE -#define GNRC_UDP_MSG_QUEUE_SIZE (8U) +/** + * @brief Default message queue size for the UDP thread (as exponent of 2^n). + * + * As the queue size ALWAYS needs to be power of two, this option + * represents the exponent of 2^n, which will be used as the size of + * the queue. + */ +#ifndef CONFIG_GNRC_UDP_MSG_QUEUE_SIZE_EXP +#define CONFIG_GNRC_UDP_MSG_QUEUE_SIZE_EXP (3U) #endif /** @@ -52,6 +61,14 @@ extern "C" { #ifndef GNRC_UDP_STACK_SIZE #define GNRC_UDP_STACK_SIZE (THREAD_STACKSIZE_DEFAULT) #endif +/** @} */ + +/** + * @brief Message queue size to use for the UDP thread. + */ +#ifndef GNRC_UDP_MSG_QUEUE_SIZE +#define GNRC_UDP_MSG_QUEUE_SIZE (1 << CONFIG_GNRC_UDP_MSG_QUEUE_SIZE_EXP) +#endif /** * @brief Calculate the checksum for the given packet