net: Add VLAN device support

Inspired by Linux's way, we also create VLAN devices for managing VLAN,
which will become interfaces like `eth0.58`.

QinQ is also supported, we can create VLAN devices above another VLAN
devices, like `eth0.100.101` (or even `eth0.1.2.3.4`, also supported on
Linux).

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng
2025-01-07 11:04:53 +08:00
committed by Alan C. Assis
parent 750fae4cca
commit 242c253178
9 changed files with 775 additions and 13 deletions
+4
View File
@@ -65,6 +65,10 @@ if(CONFIG_NET)
list(APPEND SRCS tun.c)
endif()
if(CONFIG_NET_VLAN)
list(APPEND SRCS vlan.c)
endif()
if(CONFIG_NET_FTMAC100)
list(APPEND SRCS ftmac100.c)
endif()