-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
lib: pdn: use heap for AT response buffer and make size configurable and increase CONFIG_HEAP_MEM_POOL_SIZE to 1280 for net samples #20087
base: main
Are you sure you want to change the base?
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 35fd00e33bcba549e50c10759b872ccb4a63f875 more detailssdk-nrf:
Github labels
List of changed files detected by CI (8)
Outputs:ToolchainVersion: 342151af73 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
You can find the documentation preview for this PR at this link. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
@@ -706,18 +706,20 @@ int pdn_dynamic_info_get(uint32_t cid, struct pdn_dynamic_info *pdn_info) | |||
return -EINVAL; | |||
} | |||
|
|||
cgcontrdp_at_rsp_buf = k_malloc(CONFIG_PDN_DYNAMIC_INFO_AT_BUF_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL check here? Or is that handled by nrf_modem_at_cmd()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is checked in nrf_modem_at_cmd()
, though I agree that an extra check would be useful for debugging purposes.
29f1b8c
to
6101847
Compare
Add CONFIG_PDN_DYNAMIC_INFO_AT_BUF_SIZE to make the AT response buffer size for AT+CGCONTRDP configurable, as it depends on the APN. Use k_malloc for AT buffer to avoid increasing system workqueue stack size requirement. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
6101847
to
dfb221f
Compare
I don't like that we allocate on the stack for this. Using |
Increase CONFIG_HEAP_MEM_POOL_SIZE to 1280 for samples that previously used a lower value as it is required by the zephyr kernel. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
dfb221f
to
35fd00e
Compare
Rewriting it like that could reduce the need of stack/heap, though we would still need space for storing the IPv4 and IPv6 primary and secondary DNS addresses in string form. Currently net samples are failing in CI, so I would rather get a fix merged to main, then we can discuss improvements for NCS 3.0.0. |
ok, but can you leave a comment about what you mean "1280 is required by the Zephyr kernel", what happened? :) |
Yes, if
|
size for AT+CGCONTRDP configurable, as it depends on the APN.
Use k_malloc for AT buffer to avoid increasing system workqueue stack
size requirement.
used a lower value as it is required by the zephyr kernel.