Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OFDPA fielad for Usage (STG) #420

Open
bidel65 opened this issue Nov 9, 2023 · 1 comment
Open

OFDPA fielad for Usage (STG) #420

bidel65 opened this issue Nov 9, 2023 · 1 comment

Comments

@bidel65
Copy link

bidel65 commented Nov 9, 2023

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
@KanjiMonster
Copy link
Contributor

Apr 28 17:54:45 SW ofdpa[1612]: stg default [] - Show or set the default STG

there should be a line above for which port it tried to set a STP state.

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

This has been fixed/worked around in 5.0.1.

Version: 4.8.3

Please update to latest version 5.0.1 and check if the issue still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants