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

samples: net: echo_server/client: Decrease SRAM usage for atsamr21_xpro #65781

Conversation

nandojve
Copy link
Member

In the Zephyr v3.5 to build the net samples pair echo-server/client the SRAM requirements increased for the atsamr21_xpro board when passing -DEXTRA_CONF_FILE=overlay-802154.conf argument. This adjusts the examples features to free the necessary SRAM to build and run the examples.

@nandojve nandojve added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Nov 26, 2023
@nandojve nandojve added this to the v3.6.0 milestone Nov 26, 2023
@nandojve nandojve requested a review from a user November 26, 2023 13:35
jukkar
jukkar previously approved these changes Nov 26, 2023
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_NET_IP_DSCP_ECN=n
CONFIG_NET_STATISTICS=n
CONFIG_NET_MGMT_EVENT_STACK_SIZE=384
Copy link
Member

Choose a reason for hiding this comment

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

This looks too very low, but might work ok. Note that there is CONFIG_NET_DEBUG_MGMT_EVENT_STACK option which prints stack usage after each event, and that can be used to verify the numbers.

Copy link
Member Author

@nandojve nandojve Feb 1, 2024

Choose a reason for hiding this comment

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

This board have been on limit since 2.7 and I'm constantly reducing something. Besides that still running : )

*** Booting Zephyr OS build zephyr-v3.5.0-5222-g03772eb0d806 ***


uart:~$ I: Initializing network
I: IPv6 address: 2001:db8::1
I: Run echo server
I: Network connected
I: Starting...
I: Waiting for UDP packets on port 4242 (IPv6)...
D: (udp6): UDP (IPv6): Received and replied with 21 bytes
D: (udp6): UDP (IPv6): Received and replied with 46 bytes
D: (udp6): UDP (IPv6): Received and replied with 12 bytes
D: (udp6): UDP (IPv6): Received and replied with 54 bytes
D: (udp6): UDP (IPv6): Received and replied with 84 bytes
D: (udp6): UDP (IPv6): Received and replied with 46 bytes
D: (udp6): UDP (IPv6): Received and replied with 65 bytes
D: (udp6): UDP (IPv6): Received and replied with 3 bytes
D: (udp6): UDP (IPv6): Received and replied with 116 bytes
D: (udp6): UDP (IPv6): Received and replied with 24 bytes
D: (udp6): UDP (IPv6): Received and replied with 95 bytes
D: (udp6): UDP (IPv6): Received and replied with 25 bytes
D: (udp6): UDP (IPv6): Received and replied with 67 bytes
D: (udp6): UDP (IPv6): Received and replied with 97 bytes
D: (udp6): UDP (IPv6): Received and replied with 108 bytes
*** Booting Zephyr OS build zephyr-v3.5.0-5222-g03772eb0d806 ***


uart:~$ I: Initializing network
I: IPv6 address: 2001:db8::2
I: Run echo client
I: Network connected
I: Starting...
D: IPv6 UDP: Sent 21 bytes
D: IPv6 UDP: Received and compared 21 bytes, all ok
D: IPv6 UDP: Sent 46 bytes
D: IPv6 UDP: Received and compared 46 bytes, all ok
D: IPv6 UDP: Sent 12 bytes
D: IPv6 UDP: Received and compared 12 bytes, all ok
D: IPv6 UDP: Sent 54 bytes
D: IPv6 UDP: Received and compared 54 bytes, all ok
D: IPv6 UDP: Sent 84 bytes
D: IPv6 UDP: Received and compared 84 bytes, all ok
D: IPv6 UDP: Sent 46 bytes
D: IPv6 UDP: Received and compared 46 bytes, all ok
D: IPv6 UDP: Sent 65 bytes
D: IPv6 UDP: Received and compared 65 bytes, all ok
D: IPv6 UDP: Sent 3 bytes
D: IPv6 UDP: Received and compared 3 bytes, all ok
D: IPv6 UDP: Sent 116 bytes
D: IPv6 UDP: Received and compared 116 bytes, all ok
D: IPv6 UDP: Sent 24 bytes
D: IPv6 UDP: Received and compared 24 bytes, all ok
D: IPv6 UDP: Sent 95 bytes
D: IPv6 UDP: Received and compared 95 bytes, all ok
D: IPv6 UDP: Sent 25 bytes
D: IPv6 UDP: Received and compared 25 bytes, all ok
D: IPv6 UDP: Sent 67 bytes
D: IPv6 UDP: Received and compared 67 bytes, all ok
D: IPv6 UDP: Sent 97 bytes
D: IPv6 UDP: Received and compared 97 bytes, all ok
D: IPv6 UDP: Sent 108 bytes
D: IPv6 UDP: Received and compared 108 bytes, all ok

Copy link

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

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

This fixes our problem! It would be nice to see it in (after the suggestion is applied)!

@MaureenHelm
Copy link
Member

@nandojve will you return to this before the 3.6 merge window closes this week?

@nandojve
Copy link
Member Author

Yes, thank you!

@MrKevinWeiss
Copy link

It would be nice to have in from my side :)

In the Zephyr v3.5 to build the net samples pair echo-server/client the
SRAM requirements increased for the atsamr21_xpro board when passing
-DEXTRA_CONF_FILE=overlay-802154.conf argument. This adjusts example
features to free necessary SRAM to build and run the example.

Signed-off-by: Gerson Fernando Budke <[email protected]>
This update the echo_client configurations for the atsamr21_xpro board
to match same configs defined at echo_server.

Signed-off-by: Gerson Fernando Budke <[email protected]>
@nandojve nandojve force-pushed the samr21/fix_net_socket_example_build_by_the_5_time branch from eb161a9 to 66cdbec Compare February 1, 2024 17:46
@nandojve
Copy link
Member Author

nandojve commented Feb 2, 2024

Hi @MaureenHelm ,

This seems to be ready from my side. I address all comments in regards to best values and made a test on HW yesterday. So, it only depends on approvals.

Thank you again to bring this to my attention : )

Copy link

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

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

Looks good!

@MaureenHelm MaureenHelm merged commit 78ee5b1 into zephyrproject-rtos:main Feb 2, 2024
15 checks passed
@nandojve nandojve deleted the samr21/fix_net_socket_example_build_by_the_5_time branch February 3, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Samples Samples area: Sockets Networking sockets Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants