sonic-sairedis icon indicating copy to clipboard operation
sonic-sairedis copied to clipboard

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

Open rpmarvell opened this issue 1 year ago • 32 comments

  • 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/ebcd2a4a987f1d6027cd57677dc6806b8a9adcdb/doc/qos/ECN_and_WRED_statistics_HLD.md#show-interface-counters-cli-output-on-a-wred-drop-statistics-supported-platform

The Build is failing in this review because of the swss-common-dependency at PR : https://github.com/sonic-net/sonic-swss-common/pull/777

Expected order of pull-request commits :

  1. sonic-swss common pull request : https://github.com/sonic-net/sonic-swss-common/pull/777
  2. sonic-sairedis pull request : https://github.com/sonic-net/sonic-sairedis/pull/1234
  3. sonic-swss : pull request : https://github.com/sonic-net/sonic-swss/pull/2750
  4. sonic-yang-model pull requests : https://github.com/sonic-net/sonic-buildimage/pull/14758
  5. sonic-utilities pull request : https://github.com/sonic-net/sonic-utilities/pull/2807

rpmarvell avatar Apr 24 '23 21:04 rpmarvell

please fix errors

kcudnik avatar May 04 '23 12:05 kcudnik

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

rpmarvell avatar May 04 '23 16:05 rpmarvell

please fix build errors

kcudnik avatar May 29 '23 12:05 kcudnik

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 : https://github.com/sonic-net/sonic-swss-common/issues/784

rpmarvell avatar May 29 '23 13:05 rpmarvell

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

stephenxs avatar May 30 '23 02:05 stephenxs

/azp run

akokhan avatar May 31 '23 11:05 akokhan

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 31 '23 11:05 azure-pipelines[bot]

/azp run

akokhan avatar Jun 02 '23 15:06 akokhan

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jun 02 '23 15:06 azure-pipelines[bot]

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

akokhan avatar Jun 02 '23 16:06 akokhan

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 avatar Jun 03 '23 17:06 rpmarvell

please add some unittests to meet code coverage threshold

kcudnik avatar Jun 08 '23 08:06 kcudnik

please add some unittests to meet code coverage threshold ?

LGTM. Please add more unit test cases to cover the code change

I am not finding any infra to add unit tests for changes syncd/Syncd.cpp and lib/RedisRemoteSaiInterface.cpp As these functionalities lies in private functions of class, not even able to call them from UT. Any suggestions are appreciated

rpmarvell avatar Jun 13 '23 06:06 rpmarvell

@stephenxs @msosyak can you please help to review and approve this PR? Thanks.

zhangyanzhao avatar Jun 14 '23 04:06 zhangyanzhao

@rpmarvell can you please help to address the build failure? Thanks.

zhangyanzhao avatar Jun 14 '23 04:06 zhangyanzhao

Hi @rpmarvell I'm OK with the code. Could you please add more test cases to satisfy the coverage?

Total: 533 lines
Missing: 386 lines
Coverage: 27%
Threshold: 80%
[Diff coverage](https://dev.azure.com/mssonic/be1b070f-be15-4154-aade-b1d3bfb17054/_build/results?buildId=297771&view=codecoverage-tab)

stephenxs avatar Aug 01 '23 07:08 stephenxs

Hi @rpmarvell Could you please update the DD when the UT will be ready? Thanks

stephenxs avatar Sep 01 '23 02:09 stephenxs

please resolve conflicts

kcudnik avatar Sep 01 '23 10:09 kcudnik

I have addressed the UT. Could you please help merge this change with required approvals.!

rpmarvell avatar Dec 03 '23 08:12 rpmarvell

please fix build errors

In file included from orchdaemon.h:51,
                 from main.cpp:25:
dash/dashrouteorch.h:27:11: error: 'route' in namespace 'dash' does not name a type
   27 |     dash::route::Route metadata;
      |           ^~~~~
dash/dashrouteorch.h:46:11: error: 'route' in namespace 'dash' does not name a type
   46 |     dash::route::Route metadata;
      |           ^~~~~
make[4]: *** [Makefile:918: orchagent-main.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from orchdaemon.h:51,
                 from orchdaemon.cpp:5:
dash/dashrouteorch.h:27:11: error: 'route' in namespace 'dash' does not name a type
   27 |     dash::route::Route metadata;
      |           ^~~~~
dash/dashrouteorch.h:46:11: error: 'route' in namespace 'dash' does not name a type
   46 |     dash::route::Route metadata;
      |           ^~~~~

error is in swss, mybe not related to this change

kcudnik avatar Dec 05 '23 08:12 kcudnik

please fix build errors

In file included from orchdaemon.h:51,
                 from main.cpp:25:
dash/dashrouteorch.h:27:11: error: 'route' in namespace 'dash' does not name a type
   27 |     dash::route::Route metadata;
      |           ^~~~~
dash/dashrouteorch.h:46:11: error: 'route' in namespace 'dash' does not name a type
   46 |     dash::route::Route metadata;
      |           ^~~~~
make[4]: *** [Makefile:918: orchagent-main.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from orchdaemon.h:51,
                 from orchdaemon.cpp:5:
dash/dashrouteorch.h:27:11: error: 'route' in namespace 'dash' does not name a type
   27 |     dash::route::Route metadata;
      |           ^~~~~
dash/dashrouteorch.h:46:11: error: 'route' in namespace 'dash' does not name a type
   46 |     dash::route::Route metadata;
      |           ^~~~~

error is in swss, mybe not related to this change

This is an existing break in sonic-swss, not introduced by the changes in this PR. Even the recent PR https://github.com/sonic-net/sonic-sairedis/pull/1329 is having this build break..!

rpmarvell avatar Dec 05 '23 10:12 rpmarvell

@kcudnik , @stephenxs : Could you please approve and merge the changes as all tests are passing. Thank you..!

rpmarvell avatar Dec 06 '23 18:12 rpmarvell

@rpmarvell could you please address Kamil's comments? thanks.

stephenxs avatar Jan 24 '24 05:01 stephenxs

@rpmarvell can you please address Kamil's comments? Those need be addressed before merging.

zhangyanzhao avatar Feb 05 '24 08:02 zhangyanzhao

@rpmarvell kindly reminder to address Kamil's comments. Thanks

stephenxs avatar Mar 26 '24 11:03 stephenxs

@rpmarvell kindly reminder to address Kamil's comments. Thanks

I am working on addressing the comments. Will be updating this thread once the changes are ready. Thank you.

rpmarvell avatar Mar 27 '24 10:03 rpmarvell

@kcudnik : the vs tests are failing due to the following permission issue, could you help resolve this issue.

sh: 1: ./scripts/pahole-version.sh: Permission denied init/Kconfig:97: syntax error init/Kconfig:96: invalid statement make[1]: *** [scripts/kconfig/Makefile:77: allmodconfig] Error 1 make: *** [Makefile:630: allmodconfig] Error 2

rpmarvell avatar Jun 27 '24 08:06 rpmarvell

/azp run

kcudnik avatar Jul 24 '24 05:07 kcudnik

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 24 '24 05:07 azure-pipelines[bot]

@rpmarvell Could you rebase to master and fix the build issues.

kperumalbfn avatar Aug 02 '24 04:08 kperumalbfn