-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add raw Zephyr SystemLayer implementation (noSelect) #39505
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
Add raw Zephyr SystemLayer implementation (noSelect) #39505
Conversation
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.
Code Review
This pull request introduces a new Zephyr SystemLayer implementation that operates without relying on sockets. Key areas for attention include a preprocessor macro typo in AppTask.cpp and a GNI variable name mismatch in src/system/system.gni.
6723535 to
fb283ed
Compare
fb283ed to
d5c553a
Compare
|
PR #39505: Size comparison from e45b3b0 to d5c553a Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, linux, nxp, qpg, stm32, telink, tizen)
|
Damian-Nordic
left a comment
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.
A couple initial comments.
d5c553a to
4f5eaea
Compare
|
PR #39505: Size comparison from e45b3b0 to 4f5eaea Full report (83 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Damian-Nordic
left a comment
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.
A few suggestions to consider but looks good overall
src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp
Outdated
Show resolved
Hide resolved
4f5eaea to
a0ab76c
Compare
|
PR #39505: Size comparison from 1b6541c to a0ab76c Full report (83 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
The new Zephyr System Layer implementation does not use Zephyr's BSD socket API (select). This lightweight option is suitable when the Matter network layer interacts directly with the networking stack, instead of going through Zephyr's NET L2 Layer. As a result, it does not require sockets or the select API to function. This implementation serves as an alternative to SystemLayerSelect, and both can be used alongside Zephyr if needed. Signed-off-by: Adrian Gielniewski <[email protected]> Co-authored-by: Arkadiusz Balys <[email protected]>
The new configuration allows enabling and disabling using OpenThread endpoints as well as using Zephyr SystemLayer implementation without Sockets. Signed-off-by: Adrian Gielniewski <[email protected]> Signed-off-by: Arkadiusz Balys <[email protected]>
Enabled OpenThread endpoint instead of zephyr's socket in nRFConnect all-clusters-app. Signed-off-by: Arkadiusz Balys <[email protected]>
Signed-off-by: Arkadiusz Balys <[email protected]>
a0ab76c to
c84fab6
Compare
|
PR #39505: Size comparison from d05b32d to c84fab6 Full report (83 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp
Outdated
Show resolved
Hide resolved
Separated the Zephyr implementation of GenericPlatformManager to version with and without using Select(). Signed-off-by: Arkadiusz Balys <[email protected]>
|
PR #39505: Size comparison from d05b32d to 64140e8 Full report (81 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
) * [Zephyr] Add raw Zephyr SystemLayer implementation (noSelect) The new Zephyr System Layer implementation does not use Zephyr's BSD socket API (select). This lightweight option is suitable when the Matter network layer interacts directly with the networking stack, instead of going through Zephyr's NET L2 Layer. As a result, it does not require sockets or the select API to function. This implementation serves as an alternative to SystemLayerSelect, and both can be used alongside Zephyr if needed. Signed-off-by: Adrian Gielniewski <[email protected]> Co-authored-by: Arkadiusz Balys <[email protected]> * [nrfconnect] Add configuration for CHIP_USE_OPEN_THREAD_ENDPOINT The new configuration allows enabling and disabling using OpenThread endpoints as well as using Zephyr SystemLayer implementation without Sockets. Signed-off-by: Adrian Gielniewski <[email protected]> Signed-off-by: Arkadiusz Balys <[email protected]> * [nrfconnect] Enable OpenThread endpoint in all-clusters-app Enabled OpenThread endpoint instead of zephyr's socket in nRFConnect all-clusters-app. Signed-off-by: Arkadiusz Balys <[email protected]> * Code review Signed-off-by: Arkadiusz Balys <[email protected]> * Separate GenericPlatformManagerImpl_Zephyr.ipp files Separated the Zephyr implementation of GenericPlatformManager to version with and without using Select(). Signed-off-by: Arkadiusz Balys <[email protected]> --------- Signed-off-by: Adrian Gielniewski <[email protected]> Signed-off-by: Arkadiusz Balys <[email protected]> Co-authored-by: Adrian Gielniewski <[email protected]>
Summary
The new Zephyr System Layer implementation does not use Zephyr's BSD socket API (select). This lightweight option is suitable when the Matter network layer interacts directly with the networking stack, instead of going through Zephyr's NET L2 Layer. As a result, it does not require sockets or the select API to function. This implementation serves as an alternative to SystemLayerSelect, and both can be used alongside Zephyr if needed.
Additionally, I added the capability to run the nRFConnect platform using the OpenThread TCP/UDP stack directly instead of Zephyr sockets. Thanks to this, we can test the new Zephyr System layer implementation that does not use sockets in the nRFConnect samples. I've defined OpenThread native init params in all-clusters-app.
Testing
Tested manually on the nRFConnect all-clusters-app example.
Enabled this new implementation by default in all-clusters-app, so its build process is tested in the nRFConnect workflow.
Steps to test the new solution locally: