Since LSDK20.04 is too old. I tested on the Real-time Edge 2.1 version kernel. The Rstp can recover properly when unplug the cable swp0.
root@LS1028ARDB-Ubuntu:~# mstpctl showbridge Bridge Bridge CIST info
enabled yes
bridge id 8.000.CA:6F:D6:DB:68:DC
designated root 8.000.9E:43:DA:D3:1D:42
regional root 8.000.CA:6F:D6:DB:68:DC
root port swp0 (#1)
path cost 20000 internal path cost 0
max age 20 bridge max age 20
forward delay 15 bridge forward delay 15
tx hold count 6 max hops 20
hello time 2 ageing time 300
force protocol version rstp
time since topology change 302
topology change count 1
topology change no
topology change port None
last topology change port swp0
When unplug the swp0 cable, you can see:
64 bytes from 192.168.0.11: icmp_seq=481 ttl=64 time=0.228 ms
64 bytes from 192.168.0.11: icmp_seq=482 ttl=64 time=0.220 ms
64 bytes from 192.168.0.11: icmp_seq=483 ttl=64 time=0.229 ms
64 bytes from 192.168.0.11: icmp_seq=489 ttl=64 time=0.447 ms
64 bytes from 192.168.0.11: icmp_seq=490 ttl=64 time=0.245 ms
64 bytes from 192.168.0.11: icmp_seq=491 ttl=64 time=0.219 ms
There are some frames lost, then recover.
I suggest your update the kernel. You can refer:
https://github.com/real-time-edge-sw/real-time-edge-linux