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

Multiple Spanning Tree Protocol (MSTP) Updated HLD #1761

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ridahanif96
Copy link
Collaborator

This document describes the design for Multiple Spanning Tree Protocol (MSTP) support in SONiC.

Previous MSTP Design will no longer be considered. The design is modified with a collaborative efforts of BRCM & xFlow Research to provide MSTP design for Community.

@adyeung
Copy link
Collaborator

adyeung commented Aug 2, 2024

@praveenraja1 @sutharsansr @balajib-cisco @rck-innovium @jeff-yin please review

@madhupalu madhupalu self-requested a review August 16, 2024 20:49


## Uplink Fast
MSTP standard does not support uplink fast so uplink fast functionality will be disable for MSTP.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean HLD is not supporting uplink fast?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UplinkFast was developed by Cisco as an enhancement for classic STP. Since MSTP is an IEEE standard and incorporates RSTP's rapid convergence capabilities, there was no need to include or replicate the UplinkFast feature in MSTP. So this HLD wont support uplink fast.

doc/MSTP/MSTP.md Outdated
- Configure an interface for MSTP.


- **config spanning_tree interface \<ifname\> edgeport {enable|disable}**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this correspond to AdminEdge Functionality? Will there be a seperate command to support autoEdge?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This correspond to AdminEdge. autoEdge will not be supported.

doc/MSTP/MSTP.md Outdated
- Specify configuring the port level priority for root bridge in seconds.
- Default: 128, range 0-240

- **config spanning_tree interface \<ifname\> cost \<cost-value\>**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a command to configure the link type? P2P/Shared Lan/Auto?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will add a command for link type.


### Functional Test Cases

1. Verify CONFIG DB is populated with configured MSTP parameters.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The numbering seems to be stuck with 1 (in other places too) Is it a problem with the template?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the template, numbering are done automatically. if you see preview format it will show the correct format.

doc/MSTP/MSTP.md Outdated

1. Verify MSTP over LAG.

1. Verify MSTP over static breakout ports.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add test-cases for BPDU guard and other functionalities?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more test-cases for BPDU guard and other functionalities

@bendrapubalareddy
Copy link

bendrapubalareddy commented Aug 21, 2024

@praveenraja1 @sutharsansr @balajib-cisco @rck-innovium @jeff-yin @adyeung @ridahanif96 @divyachandralekha

Hello All, I want to update here so that all the implementations are aligned on STP, PVST feature is implemented using existing open PRs on stp, validated and automated based on https://github.com/sonic-net/SONiC/blob/master/doc/stp/SONiC_PVST_HLD.md. The complete PR will be raised soon to integrate into 202411 from CISCO.
Pls reachout to @balajib-cisco or me for any information required on this regard.

@adyeung
Copy link
Collaborator

adyeung commented Aug 21, 2024

@madhupalu please invite @bendrapubalareddy to the next PENS WG meeting to discuss the code PRs plan, we have reached a consensus in the WG earlier this year that the older PRs to be dropped to align with MSTP, to avoid further delay of this feature, we need to make sure the community is coherent with the approach

@madhupalu
Copy link
Contributor

@madhupalu please invite @bendrapubalareddy to the next PENS WG meeting to discuss the code PRs plan, we have reached a consensus in the WG earlier this year that the older PRs to be dropped to align with MSTP, to avoid further delay of this feature, we need to make sure the community is coherent with the approach

@madhupalu madhupalu closed this Aug 21, 2024
@madhupalu
Copy link
Contributor

@adyeung
Copy link
Collaborator

adyeung commented Aug 21, 2024

@madhupalu don't think you meant to close this HLD, as it's still under review

@adyeung adyeung reopened this Aug 21, 2024
@madhupalu
Copy link
Contributor

@madhupalu don't think you meant to close this HLD, as it's still under review

@adyeung sure, we never close this HLD until it is being reviewed in bigger community - tuesday!

@bendrapubalareddy
Copy link

bendrapubalareddy commented Aug 22, 2024 via email

@zhangyanzhao
Copy link
Collaborator

doc/MSTP/MSTP.md Outdated
#### STP_MST_INST_TABLE
```
;Stores the STP per MSTI operational details
key = _STP_MST_INST_TABLE:"MST" id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the meeting, remove "_" prefix from the tables.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

MSTP reduces convergence time compared to STP. When a network topology change occurs, only the affected MSTI needs to reconverge, minimizing the impact on the entire network.



Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention kernel level changes expected to enable MSTP, if no changes expected and following PVST behavior, mention it accordingly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will update the HLD.

doc/MSTP/MSTP.md Outdated

# Sequence Diagrams
## MSTP global enable

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the flow diagrams with the details, where the APP_DB changes/updates are done.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the diagram with APP_DB details.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will update the HLD diagram.

doc/MSTP/MSTP.md Outdated
- debug spanning_tree mst instance \<instance-id\>
- debug spanning_tree mst bpdu [tx|rx]
- debug spanning_tree mst event
- debug spanning_tree mst verbose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be combined with "debug spanning_tee mst event" with an additional option as "detail"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please elaborate what specific "detail" needs to be done with additional option?

Copy link
Collaborator

@prvattem prvattem Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment - debug spanning_tree mst event [detail] instead of having a verbose command separately

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The below debug commands are existing for PVST and we will reuse the same command for MSTP as well.

  • debug spanning_tree bpdu [tx|rx]
  • debug spanning_tree event
  • debug spanning_tree verbose

The below will be new command added for MSTP

  • debug spanning_tree mst instance <instance-id>

doc/MSTP/MSTP.md Outdated
path "../../../STP_PORT/STP_PORT_LIST/ifname";
}
description
"Reference to Ethernet interface or PortChannel";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rephrase it to "Reference to Ethernet interface or PortChannel in the STP database";

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as per suggestion

doc/MSTP/MSTP.md Outdated
}
}

list _STP_MST_INST_TABLE_LIST {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the call please remove "_" before the name of the list.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

mst_boundary_proto = BIT ; enabled or disabled
```

#### STP_INST_PORT_FLUSH_TABLE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is STP_INST_PORT_FLUSH_TABLE needed in APP_DB? >> it is an action, shouldn't it be put on the APP DB or not?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, Redis-DB is used for communication between dockers in the SONiC architecture.
Are you looking of any alternative approaches to inter-docker communication in SONiC that you're familiar with?


1. Support protocol operation on static breakout ports

1. Support protocol operation on Port-channel interfaces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the MSTP HLD supports VS image (no ASIC) ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes


![MSTP Architecture](images/MSTPDesign_Archi.drawio.png)
## STP Container
STP Container is responsible for actions taken for BPDU rx and BPDU tx. Following are the details for implementation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please point me to the stp-container in sonic community code. I couldnt find it.
I see the following PR which is in review state:
sonic-net/sonic-buildimage#3463

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SONIC has a repository as stp which holds all these details. Please see below link to repo:
https://github.com/sonic-net/sonic-stp

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iam asking about the docker implementation in the PR sonic-net/sonic-buildimage#3463

https://github.com/sonic-net/sonic-stp -- provide stp implementation. I am looking for the stp docker, which is still in a PR sonic-net/sonic-buildimage#3463

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes Stp docker is still in above open PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the code is still in a PR, how are we basing our design, which is not present in the code base yet?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the PENS meeting , we will be pushing the STP docker PR as well.


```
;Defines instance and port for which FDB Flush needs to be performed
key = STP_INST_PORT_FLUSH_TABLE:instane:ifname ; FDB Flush instance id and port

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just use "FLUSHFDBREQUEST PORT" notification, similar to how CLI fdb clear command handles it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please share for reference code where it is being used.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed response, please refer the below py script.

src/sonic-utilities/scripts/fdbclear:33: self.db.publish('APPL_DB','FLUSHFDBREQUEST', msg)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"FLUSHFDBREQUEST PORT" is also a similar redis-DB operation which STPd does here.

name
state = "true"
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add info on how "BPDU guard" functionality will be done, considering it requires port to go into "err-disabled" mode (link-down)

Will existing LINK/PORT tables in APPL_DB be leveraged or new ones be introduced?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSTP is going to follow the same approach as the PVST does.

@bendrapubalareddy
Copy link

bendrapubalareddy commented Sep 16, 2024 via email

@ridahanif96
Copy link
Collaborator Author

Hi,
Can you pls share the meeting invite for today PENS WG meeting if there is
one scheduled? I could not find it on PENS WG page.

Thanks,
Bala

On Wed, Aug 21, 2024 at 10:48 PM Adam Yeung @.***>
wrote:

@madhupalu https://github.com/madhupalu please invite @bendrapubalareddy
https://github.com/bendrapubalareddy to the next PENS WG meeting to
discuss the code PRs plan, we have reached a consensus in the WG earlier
this year that the older PRs to be dropped to align with MSTP, to avoid
further delay of this feature, we need to make sure the community is
coherent with the approach


Reply to this email directly, view it on GitHub
#1761 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKZN6VWHWFUCS5TB43ULSDZSTDW7AVCNFSM6AAAAABLLVWPXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBSGU4TCNZYGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi Bala,

PENS lab meet is scheduled today.

Please see below meeting joining details

https://zoom-lfx.platform.linuxfoundation.org/meeting/93042804249?password=179075a6-61fe-448e-b4bc-638ea6b6a7ea

Regards

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

Successfully merging this pull request may close these issues.