-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
net: config: Add VLAN identifier as network initial configuration #59344
net: config: Add VLAN identifier as network initial configuration #59344
Conversation
5d8ca58
to
dfd4217
Compare
Add a new Kconfig parameter NET_CONFIG_MY_VLAN_ID as initial network configuration to enable users to set VLAN identifier at startup. Add a new setup_vlan(...) function to setup the VLAN identifier in the device, the call have an effect only when NET_CONFIG_MY_VLAN_ID is above zero. Signed-off-by: Luca Fancellu <[email protected]>
dfd4217
to
2eea851
Compare
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.
I have small reservations for putting VLAN setup to config lib as this allows only one VLAN tag to be set (if that is enough then all is good). That is why I originally did not put any VLAN configuration code here but instead had a samples/net/vlan
that shows how the application can setup the tags itself. So this PR certainly works but has limitations.
I think the config library is starting to show its limitations as it only supports to setup one instance of a "thing" only. In the past @cfriedt suggested using dt to configure networking config options and with dt we could have a configuration setup for multiple instances of things. Someone would just need to define dt options for networking.
So +1 from me but with reservations.
Ultimately I think this is going to be the correct solution, because DT is the only way we have to configure multi-instance devices and hardware in general. |
@jukkar @carlescufi Hi! Can you point me to the discussion about that? We are definitely interested in setting up more than one device at boot time and we can spend some time for that, I've thought before we could use DT but I was not sure until now, because you mention that. Thanks :) |
You can join the discord chat (recommended), or use the mailing lists. |
@luca-fancellu Then join the #networking channel |
Thanks @pdgendt. I think we are going to have to bring this to the Architecture WG, because USB had the same problem and they ended up using DT for this. @pdgendt @rlubos @luca-fancellu @jukkar let's continue the discussion on Discord. @luca-fancellu feel free to start a thread there |
Add a new Kconfig parameter NET_CONFIG_MY_VLAN_ID as initial network configuration to enable users to set VLAN identifier at startup.
Add a call in net_config_init_by_iface(...) function to setup the VLAN identifier in the device if the Kconfig parameter is different from zero.