Part Number: AM3352
Other Parts Discussed in Thread: DP83848C
Hello. We have a custom AM3352-based design where I have been trying to test VLAN functionality. But I am unable to get it to work. We are using systemd-networkd
Systemd-networkd config files
Here are the essentials of the config files I'm using. I adapted it slightly for the laptop I was using it in.
root@am335x-evm:/etc/systemd/network# cat 10-eth0.network[Match]Name=eth0[Network]VLAN=comvlanLinkLocalAddressing=noLLDP=noEmitLLDP=noIPv6AcceptRA=noIPv6SendRA=noroot@am335x-evm:/etc/systemd/network# cat 20-comvlan.netdev[NetDev]Name=comvlanKind=vlan[VLAN]Id=100root@am335x-evm:/etc/systemd/network# cat 30-settings.network[Match]Name=comvlan[Network]DHCP=yesConfigureWithoutCarrier=true[DHCP]ClientIdentifier=mac
Working test system: Thinkpad X270 with SystemrescueCD 8.05 x86_64
[root@sysrescue ~]# uname -a
Linux sysrescue 5.10.70-1-lts #1 SMP Thu, 30 Sep 2021 09:43:10 +0000 x86_64 GNU/Linux
[root@sysrescue ~]#
[root@sysrescue ~]#
[root@sysrescue ~]# systemctl --version
systemd 249 (249.4-1-arch)
+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified
[root@sysrescue ~]#
[root@sysrescue ~]# ip a show dev comvlan
5: comvlan@enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 54:e1:ad:db:2f:95 brd ff:ff:ff:ff:ff:ff
inet 172.16.8.109/24 metric 1024 brd 172.16.8.255 scope global dynamic comvlan
valid_lft 42853sec preferred_lft 42853sec
inet6 fde4:c20d:5b5::9d5/128 scope global dynamic noprefixroute
valid_lft 42856sec preferred_lft 42856sec
inet6 fdc6:55cb:47ce:0:56e1:adff:fedb:2f95/64 scope global mngtmpaddr noprefixroute
valid_lft forever preferred_lft forever
inet6 fde4:c20d:5b5:0:56e1:adff:fedb:2f95/64 scope global mngtmpaddr noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::56e1:adff:fedb:2f95/64 scope link
valid_lft forever preferred_lft forever
[root@sysrescue ~]#
[root@sysrescue ~]#
[root@sysrescue ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=10.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=10.0 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 10.034/10.040/10.046/0.006 ms
Non-working AM3352 system
root@am335x-evm:~#root@am335x-evm:~# uname -aLinux am335x-evm 4.19.94-gbe5389fd85 #1 PREEMPT Fri Aug 25 09:49:20 UTC 2023 armv7l GNU/Linuxroot@am335x-evm:~#root@am335x-evm:~#root@am335x-evm:~# systemctl --versionsystemd 239+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybridroot@am335x-evm:~#root@am335x-evm:~#root@am335x-evm:~# systemctl start systemd-networkdroot@am335x-evm:~# [ 7188.631916] 8021q: 802.1Q VLAN Support v1.8[ 7188.659886] net eth0: Adding vlanid 100 to vlan filter[ 7188.741536] net eth0: initializing cpsw version 1.12 (0)[ 7188.899513] NS DP83848C 10/100 Mbps PHY 4a101000.mdio:01: attached PHY driver [NS DP83848C 10/100 Mbps PHY] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)[ 7188.953321] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready[ 7188.978688] 8021q: adding VLAN 0 to HW filter on device eth0[ 7191.049979] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off[ 7191.058850] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes readyroot@am335x-evm:~# dmesg | grep cpsw[ 1.222659] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property[ 1.231163] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.[ 1.237645] cpsw 4a100000.ethernet: Using 2 as Reserved VLAN for 1 slave[ 1.244487] cpsw 4a100000.ethernet: Detected MACID = 00:12:b0:01:9b:24[ 1.251250] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4[ 1.257644] cpsw 4a100000.ethernet: ALE Table size 1024[ 1.263005] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)[ 1.271379] cpsw 4a100000.ethernet: cpsw: Detected MACID = 20:d7:78:3f:e2:8b[ 7188.741536] net eth0: initializing cpsw version 1.12 (0)[ 7191.049979] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control offroot@am335x-evm:~#root@am335x-evm:~#root@am335x-evm:~# ip a show dev comvlan6: comvlan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 00:12:b0:01:9b:24 brd ff:ff:ff:ff:ff:ff inet6 fe80::212:b0ff:fe01:9b24/64 scope link valid_lft forever preferred_lft foreverroot@am335x-evm:~#root@am335x-evm:~#root@am335x-evm:~# ifconfig comvlancomvlan Link encap:Ethernet HWaddr 00:12:B0:01:9B:24 inet6 addr: fe80::212:b0ff:fe01:9b24/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:34 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:5941 (5.8 KiB)root@am335x-evm:~#root@am335x-evm:~#root@am335x-evm:~# ping 8.8.8.8PING 8.8.8.8 (8.8.8.8): 56 data bytesping: sendto: Network is unreachable
oiojij
Should be noted that without VLAN eth0 works just fine.
Summary
Vlan configuration works on laptop Linux, not on AM335. What am I doing wrong?
I don't need switching capabilities per se; the unit has only one ethernet port. I just need to use the port sometimes as regular eth0 and sometimes with VLAN.
Help?