Skip to content

[SL-UP] Lwip config optimizations - #1150

Merged
arun-silabs merged 2 commits into
release_2.10-1.6.1from
lwip_config_optimizations
Aug 25, 2026
Merged

arun-silabs merged 2 commits into
release_2.10-1.6.1from
lwip_config_optimizations

Conversation

@arun-silabs

Copy link
Copy Markdown
Contributor

Summary

Tune SiWx917 lwIP options for lower static RAM and a correct TCP MSS, while preserving the larger AWS TCP window/send budget.

Changes :

  • Raise TCP_MSS to 1460 (Ethernet MTU) for all builds.
  • For AWS, set TCP_WND / TCP_SND_BUF explicitly (16× / 8× MSS) so the previous 4×-MSS window/send budget is unchanged without advertising an oversized MSS.
  • Cut PBUF_POOL_SIZE (32 to 16) and update PBUF_POOL_BUFSIZE (1280 to 1520) to fit MSS + headers and reduce static pbuf BSS (~41 KB → ~24 KB).

Related issues

MATTER-6533

Testing

Ran extended core tests with thermostat and lock app (3 full suite runs) and verified that no failures related to memory are seen in any of the tests.

@arun-silabs
arun-silabs requested a review from a team as a code owner August 16, 2026 18:27
@silabs-matter-ci-bot silabs-matter-ci-bot Bot added the sl-up This TAG indicates that this commit needs to be upstreamed to CSA before its next release. label Aug 16, 2026
@cursor

cursor Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes embedded TCP windowing, send buffers, and static pbuf memory, which can affect AWS connectivity and peak RAM under load; scope is limited to SiWx lwIP compile-time options and was exercised in extended Matter app tests.

Overview
SiWx lwIP options (lwipopts-siwx.h) are retuned to use a standard Ethernet TCP_MSS (1460) instead of inflating MSS on AWS builds (previously 4×1152) to grow default window/send sizes.

For SL_MATTER_ENABLE_AWS, TCP_WND and TCP_SND_BUF are now set explicitly (12× and 8× MSS) so AWS can keep a large TCP budget without advertising an oversized MSS. Non-AWS builds set TCP_SND_BUF to 2× MSS and leave TCP_WND at the opt.h default (4× MSS). The duplicate global TCP_SND_BUF define is removed.

Static pbuf RAM is reduced by halving PBUF_POOL_SIZE (32 → 16) and sizing PBUF_POOL_BUFSIZE for MSS plus link/IP headers (1280 → 1520). TCPIP_THREAD_STACKSIZE is unchanged in size (2×1024), and the AWS-only LWIP_DNS 1 line is dropped (DNS now follows the existing LWIP_DNS / LWIP_IPV4 default unless set elsewhere).

Reviewed by Cursor Bugbot for commit b9553fe. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/lwip/silabs/lwipopts-siwx.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, if we have the time, can we test this against HEAP3? Rest LGTM

Comment thread src/lwip/silabs/lwipopts-siwx.h Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b9553fe. Configure here.

Comment thread src/lwip/silabs/lwipopts-siwx.h
@arun-silabs
arun-silabs merged commit af7ad72 into release_2.10-1.6.1 Aug 25, 2026
86 checks passed
@arun-silabs
arun-silabs deleted the lwip_config_optimizations branch August 25, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sl-up This TAG indicates that this commit needs to be upstreamed to CSA before its next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants