app: PPP fixes for recovery#304
Merged
Merged
Conversation
Contributor
MarkusLassila
left a comment
There was a problem hiding this comment.
Looks good. Some questions/suggestions
| static void ppp_data_passing_thread(void*, void*, void*); | ||
| static void sm_ppp_activate_pdp_dwork_fn(struct k_work *work); | ||
| static int ppp_stop(enum ppp_reason reason); | ||
| static void ppp_cmd_fail_return_to_at_mode(void); |
Contributor
There was a problem hiding this comment.
Suggested change
| static void ppp_cmd_fail_return_to_at_mode(void); |
| } | ||
|
|
||
| ppp_state = PPP_STATE_STOPPING; | ||
| close_ppp_sockets(); |
Contributor
There was a problem hiding this comment.
What is the reason to make this earlier? To close them even if the interface closure fails?
Could there still be data coming when ppp_stop has been called?
Contributor
Author
There was a problem hiding this comment.
I was suspecting that these sockets would have been one reason why closing the interface fails.
They keep forwarding traffic, so it can cumulate data and block the LCP messages going through.
I'm unsure if there was any real effect of this after all, but it does not seem to break anything doing it in this order.
fcc4e68 to
abf87fa
Compare
Decrease LCP timeouts to one second. We don't need to realistically wait for longer on the Serial Modem side. Max retransmits set to 5 times, so total timeout is 5 seconds. Increase PPPD holdoff to twice of that, so it is 10 seconds. This allows enough time for Zephyr side to tear down the connection. Retry the net_if_down() as the first attempt might fail when there is heavy traffic. The LCP packet is still queued, so the second retry just tears down the interface in dormant state, so it does not send the LCP anymore. Lower the PPP thread priority to K_LOWEST_APPLICATION_THREAD_PRIO so it does not block any work queues. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
MarkusLassila
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decrease LCP timeouts to one second. We don't need to realistically wait for longer on the Serial Modem side. Max retransmits set to 5 times, so total timeout is 5 seconds.
Increase PPPD holdoff to twice of that, so it is 10 seconds. This allows enough time for Zephyr side to tear down the connection.
Retry the net_if_down() as the first attempt might fail when there is heavy traffic. The LCP packet is still queued, so the second retry just tears down the interface in dormant state, so it does not send the LCP anymore.
Jira: SM-326, SM-327