gnrc: make message queues static#19998
Conversation
|
Mhh... to what did you increase the queue size that it overflowed the stack? Does it make sense to increase the stack size as well then? The problem with adding the queue to static memory for all modules is that this effectively increases the RAM usage of GNRC. Does it make sense to do this only for IPv6 for now? |
|
You should then reduce the stack size of all GNRC threads by the default queue size to avoid increasing the memory requirements. |
I increased the size of the IPv6 message queue to 2⁶ to make sure that my problem of an address not getting VALID sometimes is related to that. I don´t want to increase the size upstream. I only want to give the opportunity.
Having the queue not static and configurable is a bad pattern in my eyes.
#ifndef GNRC_IPV6_STACK_SIZE
#define GNRC_IPV6_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#endif
#ifndef GNRC_PKTDUMP_STACKSIZE
#define GNRC_PKTDUMP_STACKSIZE (THREAD_STACKSIZE_MAIN)
#endif
#ifndef GNRC_UDP_STACK_SIZE
#define GNRC_UDP_STACK_SIZE (THREAD_STACKSIZE_SMALL)
#endif
#ifndef GNRC_SIXLOWPAN_STACK_SIZE
#define GNRC_SIXLOWPAN_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#endifJust subtract 64 bytes there, or is there anything better? If you want, yes but it does not look so nice and someone may wonder why. |
7bc7f15 to
85e3988
Compare
|
I think subtracting 64 bytes from each of those defines is not too bad, I ended up doing the same for We are lucky that the size of |
I think there is less luck and more authorial intend involved ;-) |
Contribution description
I saw messages sent to the IPv6 thread being dropped.
I think it could happen that an address does not become valid for that reason.
So I increased
CONFIG_GNRC_IPV6_MSG_QUEUE_SIZE_EXPand a stack overflow happened.This is not supposed to happen for a
CONFIG_variable.Testing procedure
Issues/PRs references