-
Notifications
You must be signed in to change notification settings - Fork 2k
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
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)
#endif Just 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 ;-) |
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.
Looks good to me!
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_EXP
and a stack overflow happened.This is not supposed to happen for a
CONFIG_
variable.Testing procedure
Issues/PRs references