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

Add snippets for setting up IPv6 and dual IPv4/6 for Wi-Fi #87644

Merged

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Mar 25, 2025

There is wifi-ipv4 snippet already, so add IPv6 only snippet and also dual IPv4/IPv6 stack snippet.

Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

Couple of small observations, rest is looking fine.

Small thought, would it be better to have two snippets specifically for ipv4 and ipv6, and then users can use them like this ?
west build -S wifi-ipv4
west build -S wifi-ipv6
west build -S wifi-ipv4 -S wifi-ipv6

Note, current approach is also approved 🙂

@@ -0,0 +1,28 @@
.. _snippet-wifi-ip:

Wi-Fi IPv6 Snippet (wifi-ip)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this title include IPv4 ?

CONFIG_NET_MAX_CONN=10
CONFIG_ZVFS_POLL_MAX=10

# IPv4 only for now
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment looks wrong.
This file enables ipv6, not ipv4.

CONFIG_NET_MAX_CONN=10
CONFIG_ZVFS_POLL_MAX=10

# IPv4 only for now
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment needs an update.

@tejlmand
Copy link
Collaborator

tejlmand commented Mar 27, 2025

Small thought, would it be better to have two snippets specifically for ipv4 and ipv6, and then users can use them like this ?

Nevermind, just noticed there's already a https://github.com/zephyrproject-rtos/zephyr/tree/main/snippets/wifi-ipv4 snippet.

Perhaps we could just have the wifi-ipv6 snippet and user combines them ?
Note: one for each combo like now is also ok.

@jukkar
Copy link
Member Author

jukkar commented Mar 27, 2025

Perhaps we could just have the wifi-ipv6 snippet and user combines them ?

This would have been my preferred option too, but unfortunately this is not really possible as for example the wifi-ipv4 snippet disables IPv6, so combining them is not really practical. So because of this I created the dual IPv4/6 snippet.

jukkar added 2 commits March 27, 2025 17:38

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Introduce a snippet for configuring IPv6 over Wi-Fi support in
networking samples.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Introduce a snippet for configuring IPv4 and IPv6 over Wi-Fi support
in networking samples.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
@jukkar jukkar force-pushed the devel/add-wifi-ipv6-snippet branch from de139ef to 4363ec4 Compare March 27, 2025 15:39
@jukkar
Copy link
Member Author

jukkar commented Mar 27, 2025

  • Updated according to comments

@tejlmand
Copy link
Collaborator

as for example the wifi-ipv4 snippet disables IPv6,

yes I noticed that, but I would like to question if that is correct.

I could have an existing app which uses IPv6, and on top want to use the IPv4 enabling snippet.
In such case I would not expect an IPv4 enabling snippet to disable IPv6, because I never requested that to happen.

Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

Approved.

But I do think it's slightly wrong that an IPv6 snippet has opinion regarding IPv4 settings, such as disabling IPv4.
After all, the snippet is named wifi-ipv6 and not wifi-ipv6-only.
(and same goes for the existing IPv4 snippet).

@henrikbrixandersen henrikbrixandersen merged commit 38caff2 into zephyrproject-rtos:main Mar 28, 2025
25 checks passed
@jukkar jukkar deleted the devel/add-wifi-ipv6-snippet branch March 28, 2025 13:26
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.

5 participants