Skip to content

[MSTP] Swss Support #3606

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

Merged
merged 44 commits into from
Jul 22, 2025
Merged

[MSTP] Swss Support #3606

merged 44 commits into from
Jul 22, 2025

Conversation

wajahatrazi
Copy link
Contributor

@wajahatrazi wajahatrazi commented Apr 15, 2025

What I did

  • Enhanced the existing stpmgr under cfgmgr to handle MSTP-specific configuration notifications.
  • Added MSTP-related changes in the stporch component to support MSTP operations (MSTI creation/deletion, MSTP Port Add/Update/Delete to MSTI) via SAI APIs.

Why I did it

  • To add support for the MSTP (Multiple Spanning Tree Protocol) feature in SONiC.

How I verified it

  • Added unit test cases for the MSTP-related changes in the stporch component

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kcudnik
Copy link
Contributor

kcudnik commented Apr 15, 2025

build fail related to this: sonic-net/sonic-sairedis#1473 (comment) im working on fix for that

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wajahatrazi wajahatrazi marked this pull request as ready for review April 30, 2025 04:03
@wajahatrazi wajahatrazi requested a review from prsunny as a code owner April 30, 2025 04:04
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@divyachandralekha
Copy link
Contributor

@prsunny , Please help to merge the changes

@prsunny
Copy link
Collaborator

prsunny commented Jul 18, 2025

@wajahatrazi , please fix the PR description following the template and provide all the details of the changes.

@madhupalu , please review/signoff

@@ -1208,7 +1209,7 @@ bool FabricOrchDaemon::init()
{ APP_FABRIC_MONITOR_PORT_TABLE_NAME, fabric_portsorch_base_pri },
{ APP_FABRIC_MONITOR_DATA_TABLE_NAME, fabric_portsorch_base_pri }
};
gFabricPortsOrch = new FabricPortsOrch(m_applDb, fabric_port_tables);
gFabricPortsOrch = new FabricPortsOrch(m_applDb, fabric_port_tables, m_fabricPortStatEnabled, m_fabricQueueStatEnabled);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change does not seem to be relevant to this PR, please revert.

Choose a reason for hiding this comment

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

Reverted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has been reverted

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

msg.stp_mode = L2_MSTP;

// Assign all VLANs to zero instance for MSTP
fill_n(m_vlanInstMap, MAX_VLANS, 0);

Choose a reason for hiding this comment

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

Similarly should port states be initialized for the all ports here?

{
msg->portfast = (value == "true") ? 1 : 0;
}
else if (field == "uplink_fast")
else if (field == "uplink_fast" && l2ProtoEnabled ==L2_PVSTP)

Choose a reason for hiding this comment

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

Please provide space after "=="

string op = kfvOp(t);

string instance = key.substr(13); // Remove "MST_INSTANCE|" prefix
uint16_t instance_id = static_cast<uint16_t>(stoi(instance.c_str()));

Choose a reason for hiding this comment

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

should the instance.c_str() be validated?

@madhupalu
Copy link

@prsunny @wajahatrazi I have added @sutharsansr from Aviz to review the code. thx

@wajahatrazi
Copy link
Contributor Author

Will review the comments and address

Copy link

@madhupalu madhupalu left a comment

Choose a reason for hiding this comment

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

Please address the minor review comments, major changes Looks good to me.

@prsunny prsunny merged commit 392f1aa into sonic-net:master Jul 22, 2025
15 checks passed
@prsunny
Copy link
Collaborator

prsunny commented Jul 22, 2025

Thanks @madhupalu , @divyachandralekha , @prhoskot for the reviews. @wajahatrazi , merged the PR and thanks for the good contribution. You can address the minor comments in a different PR

bobby-nexthop pushed a commit to bobby-nexthop/sonic-swss that referenced this pull request Jul 24, 2025
What I did

Enhanced the existing stpmgr under cfgmgr to handle MSTP-specific configuration notifications.
Added MSTP-related changes in the stporch component to support MSTP operations (MSTI creation/deletion, MSTP Port Add/Update/Delete to MSTI) via SAI APIs.
Why I did it

To add support for the MSTP (Multiple Spanning Tree Protocol) feature in SONiC.
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.

9 participants