Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit ee30895

Browse files
committed
Increase default stack size of sal_threads
Fixes stack overflow errors in callback code
1 parent 052f16a commit ee30895

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/linux/bcmlu/bcmpkt/unet/bcmlu_tpacket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ bcmlu_tpacket_setup(bcmlu_tpacket_t *tp)
16391639
}
16401640

16411641
sal_sprintf(name, "Bcmpkt_tp_rx_%s", tp->netif.name);
1642-
tp->rx_pid = sal_thread_create(name, 0x1000, -1, bcmlu_tpacket_rx_thread,
1642+
tp->rx_pid = sal_thread_create(name, SAL_THREAD_STKSZ, -1, bcmlu_tpacket_rx_thread,
16431643
(void*)tp);
16441644
if (tp->rx_pid == SAL_THREAD_ERROR) {
16451645
SHR_IF_ERR_MSG_EXIT(SHR_E_RESOURCE,
@@ -1651,7 +1651,7 @@ bcmlu_tpacket_setup(bcmlu_tpacket_t *tp)
16511651
*/
16521652
if (!tp->tx_immediate) {
16531653
sal_sprintf(name, "Bcmpkt_tp_tx_%s", tp->netif.name);
1654-
tp->tx_pid = sal_thread_create(name, 0x1000, -1,
1654+
tp->tx_pid = sal_thread_create(name, SAL_THREAD_STKSZ, -1,
16551655
bcmlu_tpacket_tx_thread, (void*)tp);
16561656
if (tp->tx_pid == SAL_THREAD_ERROR) {
16571657
SHR_IF_ERR_MSG_EXIT(SHR_E_RESOURCE,

src/sal/include/sal/sal_thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999

100100
/*! Default stack size for threads created via \ref sal_thread_create. */
101101
#ifndef SAL_THREAD_STKSZ
102-
#define SAL_THREAD_STKSZ 16384
102+
#define SAL_THREAD_STKSZ 524288
103103
#endif
104104

105105
/*! Opaque thread handle. */

0 commit comments

Comments
 (0)