net: Align the stack infos in net_stack linker section
There can be lot of traffic class threads and each will have their own stacks. This can trigger issue when traversing the stacks list in "net stacks" shell command. To overcome this issue, we need to align each net_stack_info struct by 32 bytes. This is the same issue that happened with net_if earlier. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
c609bd8fd7
commit
f947439fa1
1 changed files with 7 additions and 1 deletions
|
@ -105,6 +105,12 @@ int net_recv_data(struct net_if *iface, struct net_pkt *pkt);
|
|||
*/
|
||||
int net_send_data(struct net_pkt *pkt);
|
||||
|
||||
/*
|
||||
* The net_stack_info struct needs to be aligned to 32 byte boundary,
|
||||
* otherwise the __net_stack_end will point to wrong location and looping
|
||||
* through net_stack section will go wrong.
|
||||
* So this alignment is a workaround and should eventually be removed.
|
||||
*/
|
||||
struct net_stack_info {
|
||||
k_thread_stack_t *stack;
|
||||
const char *pretty_name;
|
||||
|
@ -113,7 +119,7 @@ struct net_stack_info {
|
|||
size_t size;
|
||||
int prio;
|
||||
int idx;
|
||||
};
|
||||
} __aligned(32);
|
||||
|
||||
#if defined(CONFIG_NET_SHELL)
|
||||
#define NET_STACK_GET_NAME(pretty, name, sfx) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue