basebox icon indicating copy to clipboard operation
basebox copied to clipboard

OFDPA fielad for Usage (STG)

Open bidel65 opened this issue 1 year ago • 1 comments

Expected Behavior

MSTPD handle loops in scenario.

Actual Behavior

Generated loop in scenario and I got folowing logs:

Apr 28 17:54:45 SW ofdpa[1612]:           stg default [<id>]           - Show or set the default STG
Apr 28 17:54:45 SW ofdpa[1612]: driverProcessCommand: Platform command "stg stp 2 0 block" failed, rc = -2.
Apr 28 17:54:45 SW ofdpa[1612]: 
Apr 28 17:54:45 SW ofdpa[1612]: Usage (STG): Usages:
Apr 28 17:54:45 SW ofdpa[1612]:           stg create [<id>]            - Create a STG; optionally specify ID
Apr 28 17:54:45 SW ofdpa[1612]:           stg destroy <id>             - Destroy a STG
Apr 28 17:54:45 SW ofdpa[1612]:           stg show [<id>]              - List STG(s)
Apr 28 17:54:45 SW ofdpa[1612]:           stg add <id> <vlan_id> [...]     - Add VLAN(s) to a STG
Apr 28 17:54:45 SW ofdpa[1612]:           stg remove <id> <vlan_id> [...]  - Remove VLAN(s) from a STG
Apr 28 17:54:45 SW ofdpa[1612]:           stg stp                      - Get span tree state, all ports/STGs
Apr 28 17:54:45 SW ofdpa[1612]:           stg stp <id>                 - Get span tree state of ports in STG
Apr 28 17:54:45 SW ofdpa[1612]:           stg stp <id> <pbmp> <state>  - Set span tree state of ports in STG
Apr 28 17:54:45 SW ofdpa[1612]:                                          (disable/block/listen/learn/forward)
Apr 28 17:54:45 SW ofdpa[1612]:           stg default [<id>]           - Show or set the default STG
Apr 28 17:54:45 SW ofdpa[1612]: driverProcessCommand: Platform command "stg stp 2 0 block" failed, rc = -2.

and

Apr 28 18:00:58 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: transaction timed out
Apr 28 18:00:58 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:58 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:58 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:58 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:59 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:59 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:59 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:59 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:59 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
Apr 28 18:00:59 Z8 kernel: bcm-iproc-i2c 1803b000.i2c: bus is busy
A

Steps to Reproduce the Problem

sudo ip link add swbridge type bridge vlan_filtering 1 vlan_default_pvid 0 stp_state 1 sudo ip link set swbridge up

scenario: 
     port1_________port1 
 SW1			 SW2
  |  port2_________port2  |
  |                       |  
  |                       |  
  |                       |  
  |                       |  
port4______SW3_____port3 
  
  
                          
sudo ip link add swbridge type bridge vlan_filtering 1 vlan_default_pvid 0 stp_state 1
sudo ip link set swbridge up

for i in {1..4}
do
    sudo ip link set port${i} master swbridge
    sudo bridge vlan add vid 1 dev port${i} pvid untagged
    sudo bridge vlan add vid 1 dev swbridge self
    sudo ip link set up dev port${i}
done

sudo systemctl start mstpd
sudo mstpctl addbridge swbridge
sudo systemctl restart mstpd
sudo ip link set swbridge type bridge stp_state 0
sudo ip link set swbridge type bridge stp_state 1
sudo systemctl restart mstpd
sudo mstpctl setforcevers swbridge stp

          FW   _________ FW* 
     SW1                    SW2
      |  FW   _________ BLK|
  FW|                      |BLK
      |                    |
      |                    |
      |                    |
      |___(FW*)SW3(FW)_____| 

After determining the role(forward and block) to interfaces by MSTPD,Remove the interfaces specified by FW* from the bridge and assign them ip address. and try ping between them.

SW2:

sudo ip link set dev port1 nomaster
sudo ip add add 2.2.2.1/24 dev port1
sudo ip link set up port1

SW3:

sudo ip link set dev port4 nomaster
sudo ip add add 2.2.2.4/24 dev port4
sudo ip link set up port4

ping 2.2.2.1

the simple loop in generated.and if you send among traffic, mstpd will crash and then above logs will appear.

Specifications

  • Version: 4.8.3
  • Platform: accton as461054T
  • Subsystem:ofdpa

bidel65 avatar Nov 09 '23 09:11 bidel65