-
Notifications
You must be signed in to change notification settings - Fork 649
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
modem: modem_cellular: Configurable MTU for CMUX #2661
Merged
Merged
+78
−26
Conversation
This file contains 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
aa47b25
to
6187f46
Compare
tomi-font
approved these changes
Mar 24, 2025
bjarki-andreasen
approved these changes
Mar 24, 2025
6187f46
to
da17951
Compare
Allow configuring MTU for CMUX. Some AT manual and specification define this as a frame size. Linux ldattach default to 127 bytes, 3GPP TS 27.010 defaults to 31. We should limit our CMUX frames to a size that remote end is capable of handling. Linux silently drops oversized frames. Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as this was only limiting a buffer sizes, and resulted CMUX frames to be capped to same value. Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead. Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now only used as a Chat module. DLCI pipes use CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no> (cherry picked from commit c78081e5cfe8412f43e8851d4060cbb4c93f5546)
Loading status checks…
If we end up writing zero bytes to cmux output, we can return zero instead of -ENOMEM as it would break various modules when using small buffers. For example modem_chat.c does not tolerate -ENOMEM but handles zero OK. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no> (cherry picked from commit 15b0f9033b3e5f820547fa291d72c23304aa0c7c)
da17951
to
cc95834
Compare
|
MarkusLassila
approved these changes
Mar 25, 2025
Can now be made a fromtree. |
This is already changed to |
Ah, nice. 🙂 Somehow didn't get a notification for the force push. |
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.
Pull in changes from zephyrproject-rtos/zephyr#87115
As the RC is approaching and the PR is slow to get in, I'll create a fromlist PR to get these changes into NCS for testing.
If the PR goes int before our RC, I'll refactor this to
[fromtree]