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

sonic-sairedis : Wred stats feature changes on Sai-redis and Syncd #1234

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

Conversation

rpmarvell
Copy link

@rpmarvell rpmarvell commented Apr 24, 2023

  • Stats capability query API support is added

Details :

  • Changes are done to support the stats capability query from Swss to SAI.
  • This was implemented as part of WRED and ECN statistics
  • Statistics capability query is implemented in sairedis/syncd

HLD : https://github.com/sonic-net/SONiC/blob/master/doc/qos/ECN_and_WRED_statistics_HLD.md

Expected order of pull-request commits :

  1. sonic-swss common pull request : swss-common: WRED and ECN statistics specific changes sonic-swss-common#777
  2. sonic-swss : pull request : sonic-swss: Code changes for WRED and ECN statistics sonic-swss#2750
  3. sonic-yang-model pull requests : sonic-yang-models: WRED statistics yang sonic-buildimage#14758
  4. sonic-utilities pull request : sonic-utilities: WRED stats feature changes on sonic-utilities sonic-utilities#2807
  5. sonic-sairedis pull request : sonic-sairedis : Wred stats feature changes on Sai-redis and Syncd #1234

@kcudnik
Copy link
Collaborator

kcudnik commented May 4, 2023

please fix errors

@rpmarvell
Copy link
Author

This PR is dependent on swss-common PR 777 as i have mentioned in the description. Hence the errors. Could you please review and approve the swss-common PR if possible..! Thank you

msosyak
msosyak previously approved these changes May 8, 2023
lib/ClientSai.cpp Outdated Show resolved Hide resolved
lib/ClientSai.cpp Outdated Show resolved Hide resolved
lib/RedisRemoteSaiInterface.cpp Outdated Show resolved Hide resolved
@kcudnik
Copy link
Collaborator

kcudnik commented May 29, 2023

please fix build errors

@rpmarvell
Copy link
Author

please fix build errors

sonic-sairedis is dependent on sonic-swss-common PR https://github.com/sonic-net/sonic-swss-common/pull/777 .
This sonic-swss-common PR has already been approved by maintainer but we are facing issues in merging this PR as the CI is unstable.
There is an issue raised for this in the SONiC community by Myron Sosyak, Link for this issue : sonic-net/sonic-swss-common#784

@stephenxs
Copy link
Contributor

Hi @rpmarvell
Please refer to my latest comment. I'm not able to unresolve a comment
Thanks

@akokhan
Copy link
Contributor

akokhan commented May 31, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@akokhan
Copy link
Contributor

akokhan commented Jun 2, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@akokhan
Copy link
Contributor

akokhan commented Jun 2, 2023

@rpmarvell , even swss-common changes are merged, sairedis CI is still failing. Please check.

@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch from 8d57f14 to 6b6d297 Compare June 3, 2023 17:37
@rpmarvell
Copy link
Author

Hi @rpmarvell Please refer to my latest comment. I'm not able to unresolve a comment Thanks

I have addressed your review comment. Thank you!

@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch 8 times, most recently from 68b4d42 to 380553f Compare June 4, 2023 10:31
@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch 9 times, most recently from b7384eb to e7764de Compare November 28, 2024 14:40
@kperumalbfn
Copy link

@kcudnik could you review and approve this PR

@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch from e7764de to dff8dfb Compare November 29, 2024 04:47
@kcudnik
Copy link
Collaborator

kcudnik commented Nov 29, 2024

@kcudnik could you review and approve this PR

https://dev.azure.com/mssonic/build/_build/results?buildId=708091&view=codecoverage-tab

code is not covering enough code, please satisfy, also notice from not executed code, that you are not testing actual capability function

@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch 4 times, most recently from 778035b to 2f2fe29 Compare December 5, 2024 03:47
}

stats_capability->count = 51;
stats_capability->list[0].stat_enum = SAI_PORT_STAT_IF_IN_OCTETS;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Create static vector with all stars, and then copy values in a loop

@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch from 2f2fe29 to aa06842 Compare December 10, 2024 11:19
vslib/SwitchConfig.cpp Outdated Show resolved Hide resolved
@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch from aa06842 to af08a7a Compare December 10, 2024 12:25
@@ -981,6 +981,8 @@ sai_status_t VirtualSwitchSaiInterface::queryStatsCapability(
{
SWSS_LOG_ENTER();

uint32_t i=0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

declare that internally in each for loop defininition, declaring it on function beign is old style C

@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch 6 times, most recently from 1eec6a8 to 98119ce Compare December 11, 2024 14:19
* Stats capability query API support is added
* Marvell VS support for query stats capability added

Signed-off-by: rpmarvell <[email protected]>
@rpmarvell rpmarvell force-pushed the rpmarvell_wredstats_sairedis branch from e81d22b to f719b77 Compare December 12, 2024 03:00
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.

7 participants