L2 switch ports link up/down issue in T1040

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

L2 switch ports link up/down issue in T1040

1,212 Views
Suraj_Prakash
Contributor II

Hi,

       I have been testing L2 switch ports in T1040 processor and observed the following

Initially after connecting the board with other device and made the interface up it showed the following

root@t1040d4rdb:~# ifconfig


fm1-gb0       Link encap:Ethernet HWaddr 00:04:9f:03:40:46
inet addr:10.10.10.10 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::204:9fff:fe03:4046/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4951 (4.8 KiB) TX bytes:648 (648.0 B)
Memory:ffe4e0000-ffe4e0fff

root@t1040d4rdb:~# l2switch-cfg port all config show
l2switch>Port 0 state: enabled link: down mode: auto speed: ??? duplex: half
Port 1 state: enabled link: down mode: auto speed: ??? duplex: half
Port 2 state: enabled link: down mode: auto speed: ??? duplex: half
Port 3 state: enabled link: down mode: auto speed: ??? duplex: half
Port 4 state: enabled link: up mode: auto speed: 1G duplex: full
Port 5 state: enabled link: down mode: auto speed: ??? duplex: half
Port 6 state: enabled link: down mode: auto speed: ??? duplex: half
Port 7 state: enabled link: down mode: auto speed: ??? duplex: half
Port 8 state: enabled link: down mode: static speed: 2.5G duplex: full
Port 9 state: enabled link: down mode: static speed: 2.5G duplex: full
l2switch>

and when the connecting lan cable is removed the fm1-gb0 interface is still showing up while the l2switch application is indicating the link is down

root@t1040d4rdb:~# ifconfig


fm1-gb0     Link encap:Ethernet HWaddr 00:04:9f:03:40:46
inet addr:10.10.10.10 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::204:9fff:fe03:4046/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:187 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45559 (44.4 KiB) TX bytes:648 (648.0 B)
Memory:ffe4e0000-ffe4e0fff

root@t1040d4rdb:~#
root@t1040d4rdb:~#
root@t1040d4rdb:~# l2switch-cfg port all config show
l2switch>Port 0 state: enabled link: down mode: auto speed: ??? duplex: half
Port 1 state: enabled link: down mode: auto speed: ??? duplex: half
Port 2 state: enabled link: down mode: auto speed: ??? duplex: half
Port 3 state: enabled link: down mode: auto speed: ??? duplex: half
Port 4 state: enabled link: down mode: auto speed: ??? duplex: half
Port 5 state: enabled link: down mode: auto speed: ??? duplex: half
Port 6 state: enabled link: down mode: auto speed: ??? duplex: half
Port 7 state: enabled link: down mode: auto speed: ??? duplex: half
Port 8 state: enabled link: down mode: static speed: 2.5G duplex: full
Port 9 state: enabled link: down mode: static speed: 2.5G duplex: full
l2switch>

 

Please suggest how to make fm1-gb0 interface also down upon cable removal and also kindly inform are there any interrupts provided from the processor indicating link state changes of L2 switch ports ????

Thanks in advance.

Labels (1)
0 Kudos
3 Replies

1,027 Views
vladimir_oltean
NXP Employee
NXP Employee

Please consider using the DSA driver for the T1040 switch from the mainline kernel.

https://netdevconf.info/2.1/papers/distributed-switch-architecture.pdf

https://github.com/torvalds/linux/blob/master/drivers/net/dsa/ocelot/seville_vsc9953.c

With DSA, each switch port has its own network interface with its own link status. You do not need to monitor the link status of fm1-gb0, which is effectively not the link that went down in your case.

0 Kudos

1,191 Views
yipingwang
NXP TechSupport
NXP TechSupport

The fm1-gb0 and fm1-gb1 are the two FMAN ports connected to the switch internal ports 8 and 9.

The FMAN ports are configured to be in fixed link mode. It means that in Linux, with the actual software implementation you will always see that the link is up.

At the switch level, there is no logical connection such that if the front panel ports are down, the internal ports will be also down.

0 Kudos

1,202 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check fm1-gb0 link status with command "ethtool fm1-gb0".

0 Kudos