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

Enhance mock test for dynamic buffer manager for port removing and qos reload flows #2262

Merged
merged 5 commits into from
Jun 17, 2022

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented May 7, 2022

What I did

  1. Enhance the mock test of the dynamic buffer manager in port remove and config qos clear flow and fix bugs during mock test implementation
  2. Implement mock method ProduceStateTable::del

Signed-off-by: Stephen Sun stephens@nvidia.com

Why I did it

How I verified it
Run regression test, mock test, vs test, and manual test.

Details if related

  1. Support mock test for dynamic buffer manager
    • config qos clear and reclaiming buffer
    • Remove port
  2. Handle port remove/create flow
    • Cache cable length for a port
    • Try reclaiming unused buffer when maximum buffer parameters are received for a port whose state is ADMIN_DOWN and m_bufferCompletelyInitialized is true
  3. Handle config qos clear
    • If all buffer pools are removed when m_bufferPoolReady is true, remove all zero pools and profiles.
    • Reload zero profiles and pools if they have not been loaded when reclaiming buffer

@stephenxs
Copy link
Collaborator Author

Most of the failures are warmreboot-related. None of the failures is related to the change in this PR. As this is still a draft and depends on other PR which has not yet been created, I will not retrigger it for now.

@liat-grozovik
Copy link
Collaborator

@stephenxs well done on adding more UT to swss

@liat-grozovik
Copy link
Collaborator

/azp run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@neethajohn could you please help to review?

@liat-grozovik
Copy link
Collaborator

@stephenxs please handle conflicts so we can move on with the merge

@stephenxs
Copy link
Collaborator Author

@stephenxs please handle conflicts so we can move on with the merge

sure. But this also depends on another PR #2234

@stephenxs stephenxs changed the title Support mock test for dynamic buffer manager Enhance mock test for dynamic buffer manager May 28, 2022
… fix bugs during mock test implementation

- port removing
- config qos clear

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs marked this pull request as ready for review May 28, 2022 03:28
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs
Copy link
Collaborator Author

vs test failed due to ##[error]Microsoft will start blocking usage of non-exempt self-hosted Azure DevOps pools starting April‘22..

@stephenxs
Copy link
Collaborator Author

/azpw Azure.sonic-swss

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…pool ready

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs
Copy link
Collaborator Author

/azpw run

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

Failure is caused by timeout.

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs stephenxs changed the title Enhance mock test for dynamic buffer manager Enhance mock test for dynamic buffer manager for port removing and qos reload flows Jun 6, 2022
@liat-grozovik
Copy link
Collaborator

@neethajohn could you please help to review and signoff?

Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

lgtm, wait for @neethajohn's approval

@neethajohn neethajohn merged commit 1bb5070 into sonic-net:master Jun 17, 2022
@stephenxs stephenxs deleted the enhance-buffer-mock-test branch June 17, 2022 23:31
@yxieca
Copy link
Contributor

yxieca commented Jun 20, 2022

@stephenxs this change cannot be cherry-picked into 202205 branch cleanly. please raise PR.

@stephenxs
Copy link
Collaborator Author

@yxieca thanks for update.
I forgot to mention dependency.
we need to cherry-pick #2234 first and then this one can be cherry-picked cleanly.

yxieca pushed a commit that referenced this pull request Jun 21, 2022
…s reload flows (#2262)

What I did
Enhance the mock test of the dynamic buffer manager in port remove and config qos clear flow and fix bugs during mock test implementation
Implement mock method ProduceStateTable::del
Signed-off-by: Stephen Sun stephens@nvidia.com

How I verified it
Run regression test, mock test, vs test, and manual test.

Details if related
1. Support mock test for dynamic buffer manager
config qos clear and reclaiming buffer
Remove port
2. Handle port remove/create flow
Cache cable length for a port
Try reclaiming unused buffer when maximum buffer parameters are received for a port whose state is ADMIN_DOWN and m_bufferCompletelyInitialized is true
3. Handle config qos clear
If all buffer pools are removed when m_bufferPoolReady is true, remove all zero pools and profiles.
Reload zero profiles and pools if they have not been loaded when reclaiming buffer
@yxieca
Copy link
Contributor

yxieca commented Jun 21, 2022

@stephenxs thanks. done.

jimmyzhai added a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 27, 2022
2022-06-24 93af69c: [PFC_WD] Avoid applying ZeroBuffer Profiles to ingress PG when a PFC storm is detected (sonic-net/sonic-swss#2304)
2022-06-24 37349cf: [swssconfig] Optimize performance of swssconfig (sonic-net/sonic-swss#2336)
2022-06-24 84e9b07: [fdborch] fix heap-use-after-free in clearFdbEntry() (sonic-net/sonic-swss#2353)
2022-06-24 1b8bd94: Create ACL table fails due to incorrect check for supported ACL actions #11235 (sonic-net/sonic-swss#2351)
2022-06-24 1ed0b4b: [macsec] Refactor the logic of macsec name map (sonic-net/sonic-swss#2348)
2022-06-23 f88f992: [mock_tests] Add Sflow Orch UTs (sonic-net/sonic-swss#2295)
2022-06-23 ec57bf1: [macsec] Update macsec flex counter (sonic-net/sonic-swss#2338)
2022-06-22 6e0fc85: [ACL] Support stage particular match fields (sonic-net/sonic-swss#2341)
2022-06-22 efb4530: [orchagent, DTel]: report session support to set user vrf (sonic-net/sonic-swss#2326)
2022-06-22 d82874d: Fix for "orchagent crashed when trying to delete fdb static entry with swssconfig #11046" (sonic-net/sonic-swss#2332)
2022-06-22 0c789e6: Fix qos map test in vs test (sonic-net/sonic-swss#2343)
2022-06-17 1bb5070: Enhance mock test for dynamic buffer manager for port removing and qos reload flows (sonic-net/sonic-swss#2262)
2022-06-16 700492f: [aclorch] Fix and simplify DTel watchlist tables and entries (sonic-net/sonic-swss#2155)
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
…s reload flows (sonic-net#2262)

What I did
Enhance the mock test of the dynamic buffer manager in port remove and config qos clear flow and fix bugs during mock test implementation
Implement mock method ProduceStateTable::del
Signed-off-by: Stephen Sun stephens@nvidia.com

How I verified it
Run regression test, mock test, vs test, and manual test.

Details if related
1. Support mock test for dynamic buffer manager
config qos clear and reclaiming buffer
Remove port
2. Handle port remove/create flow
Cache cable length for a port
Try reclaiming unused buffer when maximum buffer parameters are received for a port whose state is ADMIN_DOWN and m_bufferCompletelyInitialized is true
3. Handle config qos clear
If all buffer pools are removed when m_bufferPoolReady is true, remove all zero pools and profiles.
Reload zero profiles and pools if they have not been loaded when reclaiming buffer
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.

7 participants