Skip to content

Conversation

@HedongGao
Copy link
Contributor

Summary

With reference to the implementation of vconfig in Linux, a vconfig tool is added, through which you can configure the vlan interface.

Control whether the tool is enabled by compiling options CONFIG_NET_VLAN and CONFIG_NSH_DISABLE_VCONFIG.

Impact

The user can configure the vlan interface through this interface.

Testing

Open the compilation options CONFIG_NET_VLAN and CONFIG_NSH_DISABLE_VCONFIG. Add/delete the Vlan interface in the SIM environment, and check whether the configuration is successful through ifconfig.

Add vconfig command

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
@cederom
Copy link
Contributor

cederom commented Dec 29, 2025

Please add documetation.

Now we allow setting a default PCP when creating VLAN like:
`vconfig add iface-name vlan-id [pcp]`
e.g.
`vconfig add eth0 10` will create eth0.10 with VID=10 and no PCP(0)
`vconfig add eth0 10 3` will create eth0.10 with VID=10 and PCP=3

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor

@HedongGao please remove the merge patch from pr.

@xiaoxiang781216
Copy link
Contributor

Please add documetation.

@cederom here is apache/nuttx#17790

Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

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

Thank you @HedongGao :-)

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.

4 participants