AM6422: AM6422 RSTP convergence test issue

Part Number: AM6422
Other Parts Discussed in Thread: TMDS64EVM

Hello,

Problem Description:RSTP convergence test does not meet the time requirement, with occasional convergence times exceeding 20s.

Test Description:The DUT is connected to switches to form a ring network, with RSTP enabled (using the userspace program mstpd 0.1.0). A PC uses ICMP to test RSTP convergence time.

Test Topology:PC - Switch 1 --(eth0) DUT1(eth1) -- (eth0)DUT2(eth1) -- (eth0)DUT3 (eth1)-- Switch 2 -- Switch 1

Test Steps and Observed Issues:

The DUT device is AM6422, with eth0 and eth1 configured in CPSW Switch mode.

When Switch 2 is powered on, DUT2 eth1 negotiates to the Alternate port state.

When Switch 2 is powered off, DUT2 eth1 negotiates to the Designated port state.

During the transition from Switch 2 power-on to power-off, the PC-to-DUT3 ping convergence time occasionally exceeds 20s.

Problem Investigation:
After Switch 2 is powered off, port mirroring enabled on  Switch 1 captures a large number of ICMP request packets from the PC pinging DUT3. However, when DUT1 captures packets on eth0 using tcpdump, these ICMP requests are not observed.

Question:Is it possible that the ALE FDB is not flushed, causing ICMP requests to be dropped before the FDB entries age out?

Additional Information:
The mstpd 0.1.0 logs show that when an RSTP topology change occurs, it calls/sys/class/net/eth0/brport/flush to clear the bridge FDB. This ultimately calls am65_cpsw_switchdev_event_work with SWITCHDEV_FDB_DEL_TO_DEVICE. However, since the FDB entry is not added_by_user, the function returns directly without calling the final cpsw_ale_del_ucast.

SDK Version:ti-processor-sdk-linux-am64xx-evm-11.02.08.02

  • Hello, 

    Thanks for providing the SDK version you are using.

    Can you provide the specific commands/script you are using to setup RSTP? 

    What specific steps/script did you use to configure the DUT devices into CPSW switch mode?

    The mstpd 0.1.0 logs show that when an RSTP topology change occurs, it calls/sys/class/net/eth0/brport/flush to clear the bridge FDB.

    Can you share the contents of the mstpd logs?

    Question:Is it possible that the ALE FDB is not flushed, causing ICMP requests to be dropped before the FDB entries age out?

    Is it possible for you to do a sanity check on this perhaps by manually forcing an fdb flush?

    # On each DUT, after Switch 2 power-off:
    bridge fdb flush dev eth0 # Or your bridge interface (e.g., br0)
    # Monitor if ping convergence improves immediately

    -Daolin

  • Hello, 

    1. RSTP test script

    PC run a  script to continued ping all duts with 20 ms timout,  during testing power on and off switch2 by a relay auto

    2. CPSW switch mode script :

    • devlink dev param set platform/8000000.ethernet name switch_mode value true cmode runtime
    • interfac config script:
      config device 'br_lan_device'
      option name 'br-lan'
      option type 'bridge'
      list ifname 'eth0'
      list ifname 'eth1'
      option stp '1'

      config interface 'lan'
      option device 'br-lan'
      option proto 'static'
      option netmask 'xx'
      option gateway 'xx'
      option auto '1'
      option ipaddr 'xx

    3. DUT1 mstpd logs:

    Jul 15 07:02:30 aug mstpd[581]: MSTP_OUT_flush_all_fids: br-lan:eth0:0 Flushing forwarding database
    Jul 15 07:02:30 aug mstpd[581]: set_if_up: Port eth0 : up

    Jul 15 07:04:39 aug mstpd[581]: MSTP_OUT_flush_all_fids: br-lan:eth1:0 Flushing forwarding database
    Jul 15 07:04:39 aug mstpd[581]: set_if_up: Port eth1 : up
    Jul 15 07:04:41 aug mstpd[581]: MSTP_OUT_flush_all_fids: br-lan:eth1:0 Flushing forwarding database
    Jul 15 07:04:41 aug mstpd[581]: set_if_up: Port eth1 : up

    4. bridge fdb flush command not support on my system,  I just try to remove added_by_user check. It seems work, no exceeding 20s.

  • Hello Daolin,

      Any progress about this issue?

  • Hi Daolin

    Could you please help on this case?

    Thanks

    Zekun

  • Hi Du Wei,

    Apologies for the delayed response.

    4. bridge fdb flush command not support on my system,  I just try to remove added_by_user check. It seems work, no exceeding 20s.

    In order to verify if this is an issue with the driver and your workaround is the solution to the problem, I would need some time to reproduce the problem. To do this 1. can this issue be reproducible on TMDS64EVM? 2. is there a simpler topology than the one described that can reproduce the problem?

    -Daolin

  • Hello Daolin,

    Current TMDS64EVM is not available.

    Please refer the following simple topology to reproduce this problem:

    Ring Network link

    SW - DUT1 - DUT 2 -- DUT3 - SW

    RSTP topology

    SW:  root bridge

    DUT 2(Alternate Port) -- DUT3:   DUT2 eth1 port is Alternate Port connect to DUT3

    Test step

    1. ping DUT1 on DUT3,   DUT1  eth 0 study DUT3 MAC, please refer picture 1.1

    2. PC continuous ping DUT3 , please refer picture 1.2 about the first 4 ping request

    3. Unplug cable between DUT3 and SW,  ping timeout about 30 times, refer 1.2

    4. the DUT1  eth 1 study DUT3 MAC and ping restore, please refer picture 1.3

    Log:

    DUT1 ALE dump log and eth0 packets drop in ale dump and drop log.txt  

    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    23  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = untouched , port_num = 0x1
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = untouched , port_num = 0x1
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = touched   , port_num = 0x1
    AUGOS/arm64: aug@aug in /tmp
    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    23  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = untouched , port_num = 0x1
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = touched   , port_num = 0x1
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = touched   , port_num = 0x1
    AUGOS/arm64: aug@aug in /tmp
    $ bridge fdb show
    8c:08:79:73:c4:b7 dev eth0 master br-lan
    94:ae:e3:b8:0a:04 dev eth0 master br-lan
    18:3d:2d:d0:26:91 dev eth0 master br-lan
    9c:69:d3:2d:a7:ea dev eth0 master br-lan
    94:ae:e3:b8:0a:0c dev eth0 master br-lan
    8c:08:79:73:c4:6f dev eth0 vlan 1 master br-lan permanent
    8c:08:79:73:c4:6f dev eth0 master br-lan permanent
    33:33:00:00:00:01 dev eth0 self permanent
    01:00:5e:00:00:01 dev eth0 self permanent
    33:33:00:00:00:01 dev eth1 self permanent
    01:00:5e:00:00:01 dev eth1 self permanent
    33:33:00:00:00:01 dev eth2 self permanent
    01:00:5e:00:00:01 dev eth2 self permanent
    33:33:00:00:00:01 dev eth3 self permanent
    01:00:5e:00:00:01 dev eth3 self permanent
    33:33:00:00:00:01 dev br-lan self permanent
    01:00:5e:00:00:01 dev br-lan self permanent
    33:33:ff:73:c4:6f dev br-lan self permanent
    01:00:5e:00:00:fc dev br-lan self permanent
    33:33:00:01:00:03 dev br-lan self permanent
    33:33:00:01:00:02 dev br-lan self permanent
    33:33:00:00:00:02 dev br-lan self permanent
    AUGOS/arm64: aug@aug in /tmp
    $
    AUGOS/arm64: aug@aug in /tmp
    $
    AUGOS/arm64: aug@aug in /tmp
    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    23  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = untouched , port_num = 0x1
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = touched   , port_num = 0x1
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = touched   , port_num = 0x1
    AUGOS/arm64: aug@aug in /tmp
    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    45  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = untouched , port_num = 0x1
    69  : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6e, ucast_type = untouched , port_num = 0x2
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = untouched , port_num = 0x1
    AUGOS/arm64: aug@aug in /tmp
    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    45  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = untouched , port_num = 0x1
    69  : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6e, ucast_type = untouched , port_num = 0x2
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = untouched , port_num = 0x1
    AUGOS/arm64: aug@aug in /tmp
    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    45  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = touched   , port_num = 0x1
    69  : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6e, ucast_type = untouched , port_num = 0x2
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = untouched , port_num = 0x1
    AUGOS/arm64: aug@aug in /tmp
    $ sudo /home/aug/glibc-2.34/lib/ld-linux-aarch64.so.1 --library-path ~/glibc-2.34/lib/aarch64-linux-gnu/ ~/switch-config -             d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):
    0   : type: vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    1   : type: mcast, addr = 01:80:c2:00:00:00, mcast_state = blf, super, port_mask = 0x1
    2   : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6f, ucast_type = persistant, port_num = 0x0, Secure
    3   : type: mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, mcast_state = f, no super, port_mask = 0x7
    4   : type: mcast, addr = 33:33:00:00:00:01, mcast_state = f, no super, port_mask = 0x1
    5   : type: mcast, addr = 01:00:5e:00:00:01, mcast_state = f, no super, port_mask = 0x1
    6   : type: vlan , vid = 1, untag_force = 0x7, reg_mcast = 0x0, unreg_mcast = 0x0, member_list = 0x7
    24  : type: ucast, vid = 1, addr = 18:3d:2d:d0:26:91, ucast_type = touched   , port_num = 0x1
    32  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:0c, ucast_type = touched   , port_num = 0x1
    45  : type: ucast, vid = 1, addr = 94:ae:e3:b8:0a:04, ucast_type = touched   , port_num = 0x1
    68  : type: ucast, vid = 1, addr = 9c:69:d3:2d:a7:ea, ucast_type = touched   , port_num = 0x1
    69  : type: ucast, vid = 1, addr = 8c:08:79:73:c4:6e, ucast_type = untouched , port_num = 0x2
    132 : type: ucast, vid = 1, addr = 8c:08:79:73:c4:b7, ucast_type = touched   , port_num = 0x2
    AUGOS/arm64: aug@aug in /tmp
    $ sudo ethtool eth0
    Settings for eth0:
            Supported ports: [ TP    MII ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
            Supported pause frame use: Symmetric
            Supports auto-negotiation: Yes
            Supported FEC modes: Not reported
            Advertised link modes:  10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
            Advertised pause frame use: Symmetric
            Advertised auto-negotiation: Yes
            Advertised FEC modes: Not reported
            Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                                 100baseT/Half 100baseT/Full
            Link partner advertised pause frame use: No
            Link partner advertised auto-negotiation: Yes
            Link partner advertised FEC modes: Not reported
            Speed: 100Mb/s
            Duplex: Full
            Auto-negotiation: on
            Port: Twisted Pair
            PHYAD: 1
            Transceiver: external
            MDI-X: Unknown
            Supports Wake-on: gs
            Wake-on: d
            SecureOn password: 00:00:00:00:00:00
            Current message level: 0x000020f7 (8439)
                                   drv probe link ifdown ifup rx_err tx_err hw
            Link detected: yes
    AUGOS/arm64: aug@aug in /tmp
    $ sudo ethtool -S eth0
    NIC statistics:
         p0_rx_good_frames: 42099
         p0_rx_broadcast_frames: 7
         p0_rx_multicast_frames: 2252
         p0_rx_crc_errors: 0
         p0_rx_oversized_frames: 0
         p0_rx_undersized_frames: 0
         p0_ale_drop: 0
         p0_ale_overrun_drop: 0
         p0_rx_octets: 32953647
         p0_tx_good_frames: 34876
         p0_tx_broadcast_frames: 406
         p0_tx_multicast_frames: 5445
         p0_tx_octets: 2624283
         p0_tx_64B_frames: 15005
         p0_tx_65_to_127B_frames: 40257
         p0_tx_128_to_255B_frames: 491
         p0_tx_256_to_511B_frames: 469
         p0_tx_512_to_1023B_frames: 139
         p0_tx_1024B_frames: 20614
         p0_net_octets: 35577930
         p0_rx_bottom_fifo_drop: 0
         p0_rx_port_mask_drop: 0
         p0_rx_top_fifo_drop: 0
         p0_ale_rate_limit_drop: 0
         p0_ale_vid_ingress_drop: 0
         p0_ale_da_eq_sa_drop: 0
         p0_ale_block_drop: 0
         p0_ale_secure_drop: 0
         p0_ale_auth_drop: 0
         p0_ale_unknown_ucast: 0
         p0_ale_unknown_ucast_bytes: 0
         p0_ale_unknown_mcast: 0
         p0_ale_unknown_mcast_bytes: 0
         p0_ale_unknown_bcast: 0
         p0_ale_unknown_bcast_bytes: 0
         p0_ale_pol_match: 0
         p0_ale_pol_match_red: 0
         p0_ale_pol_match_yellow: 0
         p0_ale_mcast_sa_drop: 0
         p0_ale_dual_vlan_drop: 0
         p0_ale_len_err_drop: 0
         p0_ale_ip_next_hdr_drop: 0
         p0_ale_ipv4_frag_drop: 0
         p0_tx_mem_protect_err: 0
         p0_tx_pri0: 34876
         p0_tx_pri1: 0
         p0_tx_pri2: 0
         p0_tx_pri3: 0
         p0_tx_pri4: 0
         p0_tx_pri5: 0
         p0_tx_pri6: 0
         p0_tx_pri7: 0
         p0_tx_pri0_bcnt: 2624283
         p0_tx_pri1_bcnt: 0
         p0_tx_pri2_bcnt: 0
         p0_tx_pri3_bcnt: 0
         p0_tx_pri4_bcnt: 0
         p0_tx_pri5_bcnt: 0
         p0_tx_pri6_bcnt: 0
         p0_tx_pri7_bcnt: 0
         p0_tx_pri0_drop: 0
         p0_tx_pri1_drop: 0
         p0_tx_pri2_drop: 0
         p0_tx_pri3_drop: 0
         p0_tx_pri4_drop: 0
         p0_tx_pri5_drop: 0
         p0_tx_pri6_drop: 0
         p0_tx_pri7_drop: 0
         p0_tx_pri0_drop_bcnt: 0
         p0_tx_pri1_drop_bcnt: 0
         p0_tx_pri2_drop_bcnt: 0
         p0_tx_pri3_drop_bcnt: 0
         p0_tx_pri4_drop_bcnt: 0
         p0_tx_pri5_drop_bcnt: 0
         p0_tx_pri6_drop_bcnt: 0
         p0_tx_pri7_drop_bcnt: 0
         rx_good_frames: 75311
         rx_broadcast_frames: 405
         rx_multicast_frames: 5361
         rx_pause_frames: 0
         rx_crc_errors: 0
         rx_align_code_errors: 0
         rx_oversized_frames: 0
         rx_jabber_frames: 0
         rx_undersized_frames: 0
         rx_fragments: 0
         ale_drop: 2
         ale_overrun_drop: 0
         rx_octets: 44710203
         tx_good_frames: 62150
         tx_broadcast_frames: 5
         tx_multicast_frames: 88
         tx_pause_frames: 0
         tx_deferred_frames: 0
         tx_collision_frames: 0
         tx_single_coll_frames: 0
         tx_mult_coll_frames: 0
         tx_excessive_collisions: 0
         tx_late_collisions: 0
         rx_ipg_error: 0
         tx_carrier_sense_errors: 0
         tx_octets: 34506817
         tx_64B_frames: 19381
         tx_65_to_127B_frames: 67712
         tx_128_to_255B_frames: 980
         tx_256_to_511B_frames: 1027
         tx_512_to_1023B_frames: 1031
         tx_1024B_frames: 47330
         net_octets: 79217020
         rx_bottom_fifo_drop: 0
         rx_port_mask_drop: 102
         rx_top_fifo_drop: 0
         ale_rate_limit_drop: 0
         ale_vid_ingress_drop: 0
         ale_da_eq_sa_drop: 0
         ale_block_drop: 0
         ale_secure_drop: 0
         ale_auth_drop: 0
         ale_unknown_ucast: 4
         ale_unknown_ucast_bytes: 768
         ale_unknown_mcast: 44
         ale_unknown_mcast_bytes: 4297
         ale_unknown_bcast: 32
         ale_unknown_bcast_bytes: 2048
         ale_pol_match: 0
         ale_pol_match_red: 0
         ale_pol_match_yellow: 0
         ale_mcast_sa_drop: 0
         ale_dual_vlan_drop: 0
         ale_len_err_drop: 0
         ale_ip_next_hdr_drop: 0
         ale_ipv4_frag_drop: 0
         iet_rx_assembly_err: 0
         iet_rx_assembly_ok: 0
         iet_rx_smd_err: 0
         iet_rx_frag: 0
         iet_tx_hold: 0
         iet_tx_frag: 0
         tx_mem_protect_err: 0
         tx_pri0: 62150
         tx_pri1: 0
         tx_pri2: 0
         tx_pri3: 0
         tx_pri4: 0
         tx_pri5: 0
         tx_pri6: 0
         tx_pri7: 0
         tx_pri0_bcnt: 34506817
         tx_pri1_bcnt: 0
         tx_pri2_bcnt: 0
         tx_pri3_bcnt: 0
         tx_pri4_bcnt: 0
         tx_pri5_bcnt: 0
         tx_pri6_bcnt: 0
         tx_pri7_bcnt: 0
         tx_pri0_drop: 0
         tx_pri1_drop: 0
         tx_pri2_drop: 0
         tx_pri3_drop: 0
         tx_pri4_drop: 0
         tx_pri5_drop: 0
         tx_pri6_drop: 0
         tx_pri7_drop: 0
         tx_pri0_drop_bcnt: 0
         tx_pri1_drop_bcnt: 0
         tx_pri2_drop_bcnt: 0
         tx_pri3_drop_bcnt: 0
         tx_pri4_drop_bcnt: 0
         tx_pri5_drop_bcnt: 0
         tx_pri6_drop_bcnt: 0
         tx_pri7_drop_bcnt: 0
    AUGOS/arm64: aug@aug in /tmp
    $
    AUGOS/arm64: aug@aug in /tmp
    $ sudo ethtool -S eth0 | grep drop
         p0_ale_drop: 0
         p0_ale_overrun_drop: 0
         p0_rx_bottom_fifo_drop: 0
         p0_rx_port_mask_drop: 0
         p0_rx_top_fifo_drop: 0
         p0_ale_rate_limit_drop: 0
         p0_ale_vid_ingress_drop: 0
         p0_ale_da_eq_sa_drop: 0
         p0_ale_block_drop: 0
         p0_ale_secure_drop: 0
         p0_ale_auth_drop: 0
         p0_ale_mcast_sa_drop: 0
         p0_ale_dual_vlan_drop: 0
         p0_ale_len_err_drop: 0
         p0_ale_ip_next_hdr_drop: 0
         p0_ale_ipv4_frag_drop: 0
         p0_tx_pri0_drop: 0
         p0_tx_pri1_drop: 0
         p0_tx_pri2_drop: 0
         p0_tx_pri3_drop: 0
         p0_tx_pri4_drop: 0
         p0_tx_pri5_drop: 0
         p0_tx_pri6_drop: 0
         p0_tx_pri7_drop: 0
         p0_tx_pri0_drop_bcnt: 0
         p0_tx_pri1_drop_bcnt: 0
         p0_tx_pri2_drop_bcnt: 0
         p0_tx_pri3_drop_bcnt: 0
         p0_tx_pri4_drop_bcnt: 0
         p0_tx_pri5_drop_bcnt: 0
         p0_tx_pri6_drop_bcnt: 0
         p0_tx_pri7_drop_bcnt: 0
         ale_drop: 2
         ale_overrun_drop: 0
         rx_bottom_fifo_drop: 0
         rx_port_mask_drop: 102
         rx_top_fifo_drop: 0
         ale_rate_limit_drop: 0
         ale_vid_ingress_drop: 0
         ale_da_eq_sa_drop: 0
         ale_block_drop: 0
         ale_secure_drop: 0
         ale_auth_drop: 0
         ale_mcast_sa_drop: 0
         ale_dual_vlan_drop: 0
         ale_len_err_drop: 0
         ale_ip_next_hdr_drop: 0
         ale_ipv4_frag_drop: 0
         tx_pri0_drop: 0
         tx_pri1_drop: 0
         tx_pri2_drop: 0
         tx_pri3_drop: 0
         tx_pri4_drop: 0
         tx_pri5_drop: 0
         tx_pri6_drop: 0
         tx_pri7_drop: 0
         tx_pri0_drop_bcnt: 0
         tx_pri1_drop_bcnt: 0
         tx_pri2_drop_bcnt: 0
         tx_pri3_drop_bcnt: 0
         tx_pri4_drop_bcnt: 0
         tx_pri5_drop_bcnt: 0
         tx_pri6_drop_bcnt: 0
         tx_pri7_drop_bcnt: 0
    AUGOS/arm64: aug@aug in /tmp
    $ ifconfig
    br-lan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.1.2  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::8e08:79ff:fe73:c46f  prefixlen 64  scopeid 0x20<link>
            ether 8c:08:79:73:c4:6f  txqueuelen 1000  (Ethernet)
            RX packets 32124  bytes 1750145 (1.6 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 20112  bytes 31586717 (30.1 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    can0: flags=193<UP,RUNNING,NOARP>  mtu 16
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1023  (UNSPEC)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 32 overruns 0  carrier 32  collisions 0
            device interrupt 72
    
    can1: flags=193<UP,RUNNING,NOARP>  mtu 16
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1023  (UNSPEC)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 32 overruns 0  carrier 32  collisions 0
            device interrupt 73
    
    can2: flags=193<UP,RUNNING,NOARP>  mtu 16
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1023  (UNSPEC)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 9 overruns 0  carrier 9  collisions 0
            device interrupt 82
    
    can3: flags=193<UP,RUNNING,NOARP>  mtu 16
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1023  (UNSPEC)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 9 overruns 0  carrier 9  collisions 0
            device interrupt 96
    
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            ether 8c:08:79:73:c4:6f  txqueuelen 1000  (Ethernet)
            RX packets 34986  bytes 2498816 (2.3 MiB)
            RX errors 0  dropped 144  overruns 0  frame 0
            TX packets 40005  bytes 32660711 (31.1 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            ether 8c:08:79:73:c4:6f  txqueuelen 1000  (Ethernet)
            RX packets 90  bytes 7658 (7.4 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 2200  bytes 118230 (115.4 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 192.168.2.10  netmask 255.255.255.0  broadcast 192.168.2.255
            ether 9a:19:e9:e2:30:cd  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether 26:75:01:f9:0d:5a  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 64  bytes 6078 (5.9 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 64  bytes 6078 (5.9 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    

  • Hi Du Wei,

    SW:  root bridge

    Is the SW absolutely necessary? Is using just 3 DUT (for example TMDS64EVM) possible?

    Also, maybe I missed this but was there a specific setup guide you were using from the TI SDK documentation to setup RSTP? Is there a specific user space application or setup script you are using to set up RSTP? It was mentioned a script was used for pinging but not clear any configuration needed to set up RSTP. I see you mentioned MSTPD logs which indicate some sort of daemon was used.

    -Daolin

  • Hello Daolin,

    We use openwrt uci tool to setup rstp.  It equivalents to below commands.  The mstpd veriosn is  0.1.0 

    ip link set dev eth0 down

    ip link set dev eth1 down

    sleep 1

    ip link set dev eth0 up

    ip link set dev eth1 up

    sleep 2

    devlink dev param set platform/8000000.ethernet name switch_mode value true cmode runtime

    sleep 1

    ip link add name br0 type bridge

    sleep 1

    ip link set dev eth0 master br0

    ip link set dev eth1 master br0

    ip link set dev br0 type bridge stp_state 2

    ip link set dev br0 up

    bridge vlan add dev br0 vid 1 self

    bridge vlan add dev br0 vid 1 pvid untagged self

    ip addr add 192.168.1.10/24 dev br0

    sudo mstpd
    sudo mstpctl setforcevers br0 rstp
    sudo mstpctl addbridge br0

  • Hello Daolin,

      SW is necessary. PC needs connect SW to ping DUTs.

      I add some debug log to trace this issue. You can refer it.

      BPDU TC occurs, mstpd will call flush.  The debug log added in am65-cpsw-switchdev.c shows cpsw_ale_del_ucast is not called.

    Jul 29 03:05:55 aug kernel: [ 872.673334] br-lan: port 2(eth1) entered blocking state
    Jul 29 03:05:55 aug kernel: [ 872.678650] am65-cpsw-nuss 8000000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
    Jul 29 03:05:55 aug mstpd[588]: set_if_up: Port eth1 : up
    Jul 29 03:05:55 aug netifd[368]: Network device 'eth1' link is up
    Jul 29 03:05:55 aug mstpd[588]: MSTP_OUT_set_state: br-lan:eth1:0 entering learning state
    Jul 29 03:05:55 aug mstpd[588]: MSTP_OUT_set_state: br-lan:eth1:0 entering forwarding state
    Jul 29 03:05:55 aug kernel: [ 872.709878] br-lan: port 2(eth1) entered learning state
    Jul 29 03:05:55 aug kernel: [ 872.715586] br-lan: port 2(eth1) entered forwarding state
    Jul 29 03:05:55 aug kernel: [ 872.722099] am65-cpsw-nuss 8000000.ethernet eth0: cpsw_fdb_del: MACID = 8c:08:79:73:c4:d5 vid = 0 flags = 0 0 -- port 1
    Jul 29 03:05:55 aug mstpd[588]: MSTP_OUT_flush_all_fids: br-lan:eth0:0 Flushing forwarding database
    Jul 29 03:05:55 aug mstpd[588]: set_if_up: Port eth1 : up
    Jul 29 03:05:55 aug kernel: [ 872.733111] am65-cpsw-nuss 8000000.ethernet eth0: cpsw_fdb_del: MACID = dc:be:04:bd:a0:e2 vid = 0 flags = 0 0 -- port 1
    Jul 29 03:05:55 aug kernel: [ 872.744058] am65-cpsw-nuss 8000000.ethernet eth0: cpsw_fdb_del: MACID = 8c:08:79:73:b0:99 vid = 0 flags = 0 0 -- port 1
    Jul 29 03:05:55 aug mstpd[588]: set_if_up: Port eth1 : up
    Jul 29 03:05:55 aug mstpd[588]: set_if_up: Port eth0 : up
    Jul 29 03:05:57 aug mstpd[588]: MSTP_OUT_flush_all_fids: br-lan:eth0:0 Flushing forwarding database
    Jul 29 03:05:57 aug mstpd[588]: set_if_up: Port eth0 : up
    Jul 29 03:05:57 aug kernel: [ 873.913588] am65-cpsw-nuss 8000000.ethernet eth0: cpsw_fdb_del: MACID = 8c:08:79:73:b0:99 vid = 0 flags = 0 0 -- port 1
    Jul 29 03:06:28 aug systemd[1]: Starting Cleanup of Temporary Directories...
    Jul 29 03:06:28 aug systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
    Jul 29 03:06:28 aug systemd[1]: Finished Cleanup of Temporary Directories.

  • Hi Du Wei,

    Thanks for sending the setup details. I will see what I can do to try and reproduce the problem.

    If you don't hear from me by Wednesday next week, please kindly ping this thread.

    -Daolin