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

[ppi]: Implement port bulk comparison logic #2564

Merged
merged 6 commits into from
Jul 23, 2023

Conversation

nazariig
Copy link
Collaborator

@nazariig nazariig commented Dec 9, 2022

Signed-off-by: Nazarii Hnydyn [email protected]

DEPENDS:

  1. [ppi]: Enable bulk API sonic-sairedis#1171
  2. [syncd]: Enable port bulk API sonic-sairedis#1197
  3. [subinterface] Fix admin state handling #2806

HLD: sonic-net/SONiC#1084

What I did

  • Implemented port bulk add/remove comparison logic
  • Refactored Port OA to facilitate port config operations

Why I did it

  • To improve switch Fast Boot startup time

How I verified it

  • UT tests
  • VS tests

Details if related

  • N/A

@bingwang-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny requested a review from prgeor December 16, 2022 18:40
@nazariig
Copy link
Collaborator Author

nazariig commented Jan 4, 2023

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig
Copy link
Collaborator Author

nazariig commented Jan 5, 2023

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig
Copy link
Collaborator Author

nazariig commented Jan 5, 2023

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor
Copy link
Contributor

prgeor commented Jan 8, 2023

@nazariig can you attach the test results to the PR?

@prgeor
Copy link
Contributor

prgeor commented Jan 9, 2023

@nazariig can you provide more detailed test results. Have you tested AN/LT? FEC?

@nazariig
Copy link
Collaborator Author

@nazariig can you provide more detailed test results. Have you tested AN/LT? FEC?

@prgeor done. All VS tests are passed. BTW, we don't have a way to test LT. Maybe you can help with that?

@liat-grozovik
Copy link
Collaborator

@nazariig please review the gap in the coverage report.
@prgeor is the change approved from your pov?

@prgeor
Copy link
Contributor

prgeor commented Jan 23, 2023

@nazariig please share the performance data for ports create as part of create_switch (SAI profile file) vs bulk ports create from portsorch for your platform

@prgeor
Copy link
Contributor

prgeor commented Jan 23, 2023

@nazariig can you provide more detailed test results. Have you tested AN/LT? FEC?

@prgeor done. All VS tests are passed. BTW, we don't have a way to test LT. Maybe you can help with that?

@nazariig can you test AN?

@prgeor
Copy link
Contributor

prgeor commented Jan 23, 2023

@nazariig can you provide more detailed test results. Have you tested AN/LT? FEC?

@nazariig can you test setting of FEC?

attrPtrList.push_back(attrDataList.back().data());
}

auto status = sai_port_api->create_ports(
Copy link
Contributor

Choose a reason for hiding this comment

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

From HLD, what if create_ports is NULL or not supported?

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@prgeor these statements are not relevant:

  1. Checking for NULL doesn't make any sense - the bulk API (sairedis) is implemented and currently available for all the vendors
  2. The current syncd implementation doesn't propagate SAI_STATUS_NOT_SUPPORTED and SAI_STATUS_NOT_IMPLEMENTED codes to upper layer. Instead, it automatically falls back to the legacy one-by-one processing of the requested bulk operation objects. Taking this into consideration, there is no point to have a capabilities check in swss

@prgeor
Copy link
Contributor

prgeor commented Jan 23, 2023

@nazariig can you simulate a scenario where your changes are tested on your platform where it does not support bulk port creation?

@nazariig
Copy link
Collaborator Author

@nazariig please share the performance data for ports create as part of create_switch (SAI profile file) vs bulk ports create from portsorch for your platform

it is not relevant in context of this feature, since create_switch part hasn't been touched.

@nazariig
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 2564 in repo sonic-net/sonic-swss

@nazariig
Copy link
Collaborator Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 2564 in repo sonic-net/sonic-swss

@xumia
Copy link
Collaborator

xumia commented Jul 22, 2023

@nazariig , could you please try the command "/azpw run Azure.sonic-swss" again?

@nazariig
Copy link
Collaborator Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig
Copy link
Collaborator Author

nazariig commented Jul 22, 2023

@nazariig , could you please try the command "/azpw run Azure.sonic-swss" again?

@xumia done. It works! Did you fix the issue?

@liat-grozovik
Copy link
Collaborator

@prgeor @lguohan please be reminded this is critical feature for 202305 and 202211. please close the review ASAP.

liat-grozovik pushed a commit that referenced this pull request Jul 23, 2023
- What I did
Implemented port bulk add/remove comparison logic
Refactored Port OA to facilitate port config operations

- Why I did it
To improve switch Fast Boot startup time

- How I verified it
UT tests
VS tests

Backport from master: [ppi]: Implement port bulk comparison logic #2564
Signed-off-by: Nazarii Hnydyn <[email protected]>
@liat-grozovik
Copy link
Collaborator

Backported PR was approved and merged. moving forward with this PR as well.

@liat-grozovik liat-grozovik merged commit d54c767 into sonic-net:master Jul 23, 2023
14 checks passed
StormLiangMS pushed a commit that referenced this pull request Sep 25, 2023
DEPENDS:

[202211][ppi]: Implement port bulk comparison logic (#2564)  #2821
HLD: sonic-net/SONiC#1084

What I did

Removed unused code
Why I did it

To complete code cleanup
How I verified it

UT tests
VS tests
Details if related

Backport from master: [ppi]: General code cleanup: remove unused methods #2867
dgsudharsan pushed a commit to dgsudharsan/sonic-swss that referenced this pull request Oct 4, 2023
- What I did
Implemented port bulk add/remove comparison logic
Refactored Port OA to facilitate port config operations

- Why I did it
To improve switch Fast Boot startup time

- How I verified it
UT tests
VS tests

Signed-off-by: Nazarii Hnydyn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants