-
Notifications
You must be signed in to change notification settings - Fork 7k
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
trickle.c can't work for multiple triggerings #15606
Labels
Comments
Nice analysis. Could you send a PR that implements the fix you have in the comment? |
lingwei901011
added a commit
to lingwei901011/zephyr
that referenced
this issue
Apr 24, 2019
Fixed the issue zephyrproject-rtos#15606 Signed-off-by: ling wei <[email protected]>
lingwei901011
added a commit
to lingwei901011/zephyr
that referenced
this issue
Apr 24, 2019
fixed the issue zephyrproject-rtos#15606. for multiple triggerings, we need re-initialize the delayed work "trickle->timer" to change its handler function to trickle_timeout() Signed-off-by: ling wei <[email protected]>
lingwei901011
added a commit
to lingwei901011/zephyr
that referenced
this issue
Apr 24, 2019
We need to re-initialize the trickle->timer delayed work to use trickle_timeout() if there are multiple triggerings. Fixes zephyrproject-rtos#15606 Signed-off-by: ling wei <[email protected]>
backporting bot
pushed a commit
that referenced
this issue
Apr 24, 2019
We need to re-initialize the trickle->timer delayed work to use trickle_timeout() if there are multiple triggerings. Fixes #15606 Signed-off-by: ling wei <[email protected]>
nashif
pushed a commit
that referenced
this issue
May 3, 2019
We need to re-initialize the trickle->timer delayed work to use trickle_timeout() if there are multiple triggerings. Fixes #15606 Signed-off-by: ling wei <[email protected]>
nashif
pushed a commit
to nashif/zephyr
that referenced
this issue
May 7, 2019
We need to re-initialize the trickle->timer delayed work to use trickle_timeout() if there are multiple triggerings. Fixes zephyrproject-rtos#15606 Signed-off-by: ling wei <[email protected]>
nashif
pushed a commit
that referenced
this issue
May 7, 2019
We need to re-initialize the trickle->timer delayed work to use trickle_timeout() if there are multiple triggerings. Fixes #15606 Signed-off-by: ling wei <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
in subsys/net/ip/trickle.c, the delayed work "trickle->timer" is initialized in net_trickle_start() at the first time to set its handler function as trickle_timeout(), in which the callback function we need will be invoked. Then, in the trickle_timeout(), the reschedule() will be called to re-schedule the next interval. in reschedule(), the SAME delayed work "trickle->timer" is initialized at the second time to change its handler function to double_interval_timeout(). However, when double_interval_timeout() is invoked, it calculates the next interval correctly and directly submits the delayed work BUT it doesn't re-change the SAME delayed work "trickle->timer" handler function to trickle_timeout(). so the delayed work's handler function is always the "double_interval_timeout()" and NEVER call the trickle_timeout() again and NEVER invoke the callback function we need again!.
Expected behavior
for multiple triggerings, we need re-initialize the SAME delayed work "trickle->timer" to change its handler function to trickle_timeout(). the modification is shown as follow:
we have verified the modified trickle on our STM32F217ZG board.
Impact
the pre-version trickle timer can't trigger for multiple times.
Environment (please complete the following information):
please feel free to contact me if any questions
The text was updated successfully, but these errors were encountered: