Tool/software: Linux
I'm seeing a bandwidth performance problem when using a VLAN on our AM335x based board.
Here are the details of my setup:
- Linux kernel 4.1.15
- CPSW is configure for switch mode.
- Both external switch ports are populated as gigabit ports.
- I'm using systemd-networkd to setup VLAN 12 as eth0.12
- I'm using the script below to configure the CPSW to enable the VLAN.
The problem I'm seeing is if I have both of external ports populated with active links (e.g. port 1 connected to a dumb switch, and port 2 connected to a PC or another AM335x board) then the TX bandwidth from the AM335x goes way down (like from 150Mbits to 1.5Mbits). This occurs for the eth0 and eth0.12 interface and is very repeatable. The amount of bandwidth lost seems to vary from board to board. I can eliminate the problem by either disconnecting one of the active links or removing the VLAN interface from the systemd-networkd configuration.
I'm using iperf to measure the bandwidth and to repeat the problem only seems to affect the TX bandwidth numbers.
I'm really puzzled and hoping that someone can point me towards a solution or a thread to pull.
Thanks,
Matt S.
Switch Config Script
#!/bin/sh set -e echo "switch-config BEGIN" # Client network: VLAN 1000 disabled switch-config --del-vlan 1000 || true # System network: VLAN 12 on port 0 (CPU port), 1 and 2 # - Member port = 7: Bit 0 - Host port/Port 0, Bit 1 - Slave 0/Port 1, Bit 2 - Slave 1/Port 2 # - Untagged Egress port mask = 0: Bit 0 - Host port/Port 0, Bit 1 - Slave 0/Port 1, Bit 2 - Slave 1/Port 2 # - Registered Multicast flood port mask = 7: Bit 0 - Host port/Port 0, Bit 1 - Slave 0/Port 1, Bit 2 - Slave 1/Port 2 # - Unknown Multicast flood port mask = 0: Bit 0 - Host port/Port 0, Bit 1 - Slave 0/Port 1, Bit 2 - Slave 1/Port 2 switch-config --add-vlan 12 --port 7 --vid-untag 0 --reg-multi 7 --unreg-multi 0 # Port 0,1 and 2 are Trunk Ports (which see 802.1Q-tagged Ethernet frames), no port VLAN ID required switch-config --set-port-vlan 0 --port 0 switch-config --set-port-vlan 0 --port 1 switch-config --set-port-vlan 0 --port 2 switch-config -d