[SOLVED] Understanding swconfig output

Hi,

I am trying to understand the output of swconfig on my device (Olinuxino-RT5350).
RT5350 is said to have "Embedded 5-port 10/100 Mbps Ethernet switch".

However swconfig's output mentions 7 ports:

Global attributes:
        enable_vlan: 1
        alternate_vlan_disable: 0
        bc_storm_protect: 0
        led_frequency: 0
Port 0:
        disable: 0
        doubletag: 0
        untag: 1
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 1
        link: port:0 link:down
Port 1:
        disable: 0
        doubletag: 0
        untag: 1
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 1
        link: port:1 link:down
Port 2:
        disable: 0
        doubletag: 0
        untag: 1
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 1
        link: port:2 link:down
Port 3:
        disable: 0
        doubletag: 0
        untag: 1
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 1
        link: port:3 link:down
Port 4:
        disable: 0
        doubletag: 0
        untag: 1
        led: 5
        lan: 0
        recv_bad: 0
        recv_good: 28472
        tr_bad: 0
        tr_good: 8508
        pvid: 1
        link: port:4 link:up speed:100baseT full-duplex 
Port 5:
        disable: 1
        doubletag: 0
        untag: 0
        led: ???
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        disable: 0
        doubletag: 0
        untag: 0
        led: ???
        lan: ???
        recv_bad: ???
        recv_good: ???
        tr_bad: ???
        tr_good: ???
        pvid: 0
        link: port:6 link:up speed:1000baseT full-duplex

What is port 5 (always disabled and cannot be enabled).
What is port 6 (always enabled and cannot be disabled).

Often, the switch "core" that is dropped into an SoC has seven ports; four for LAN, one for WAN, and two for Ethernet MACs. If the rest of the device doesn't have them built out (either the jacks on the case or the MACs in the SoC), then they'll typically be disabled. Ones internally "wired" to the MACs are typically always enabled.

swconfig is generic, and looks at the switch's internal registers.

I didn't see many details at https://openwrt.org/toh/olimex/rt5350f-olinuxino-evb

target/linux/ramips/dts/RT5350F-OLINUXINO.dtsi suggests that it is a single-MAC device, so one port disabled would be consistent with that.

2 Likes

Many thanks @jeff !

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.