Skip to content
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

[nrf fromlist] [nrfconnect] Optimize packet buffer size #434

Closed
wants to merge 1 commit into from

Conversation

Damian-Nordic
Copy link
Contributor

@Damian-Nordic Damian-Nordic commented Apr 24, 2024

Matter requires that regular Matter messages fit in IPv6 MTU of 1280 bytes so the default packet buffer size of 1583 bytes seems excessively large for some configurations. Especially that the buffers only hold the UDP payload in the case of non-LWIP transports.

There are two exceptions to the above though:

  1. Minimal mDNS uses the same packet buffer pool and mDNS message size is not limited to 1280 bytes, so shrinking the buffer size below MTU might have a negative impact on the mDNS behavior.
  2. Matter allows definining so called large messages that can be bigger than 1280 bytes and sent over TCP, but that is not implemented yet and will likely require a different allocation mechanism.

manifest-pr-skip

Matter requires that regular Matter messages fit in IPv6 MTU
of 1280 bytes so the default packet buffer size of 1583 bytes
seems excessively large for some configurations. Especially
that the buffers only hold the UDP payload in the case of
non-LWIP transports.

There are two exceptions to the above though:
1. Minimal mDNS uses the same packet buffer pool and mDNS
   message size is not limited to 1280 bytes, so shrinking
   the buffer size below MTU might have a negative impact
   on the mDNS behavior.
2. Matter allows definining so called large messages that
   can be bigger than 1280 bytes and sent over TCP, but that
   is not implemented yet and will likely require a different
   allocation mechanism.

Signed-off-by: Damian Krolik <[email protected]>
@Damian-Nordic Damian-Nordic deleted the packetbuffer branch May 16, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants