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

Add synchronous clear_stats operation path #463

Merged
merged 15 commits into from
Jun 8, 2019

Conversation

wendani
Copy link
Contributor

@wendani wendani commented May 30, 2019

Depend on:
sonic-net/sonic-swss-common#281

Tested on brcm dut

Success story
May 30 18:34:54.871053 str-dx010-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: generic clear stats key: SAI_OBJECT_TYPE_BUFFER_POOL:oid:0x180000000005b0, fields: 1
May 30 18:34:54.871108 str-dx010-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: wait for clear_stats response
May 30 18:34:54.871806 str-dx010-acs-1 ERR syncd#syncd: :- processEvent: Receive op: clear_stats
May 30 18:34:54.871806 str-dx010-acs-1 ERR syncd#syncd: :- processClearStatsEvent: Object type SAI_OBJECT_TYPE_BUFFER_POOL, about to clear its stats
May 30 18:34:54.872323 str-dx010-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: response: key = SAI_STATUS_SUCCESS, op = getresponse
May 30 18:34:54.872623 str-dx010-acs-1 ERR swss#orchagent: :- internal_redis_clear_stats_process: Counter id received SAI_BUFFER_POOL_STAT_WATERMARK_BYTES, expected SAI_BUFFER_POOL_STAT_WATERMARK_BYTES
May 30 18:34:54.872623 str-dx010-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: generic clear status: SAI_STATUS_SUCCESS
May 30 18:34:54.872623 str-dx010-acs-1 ERR swss#orchagent: :- generateBufferPoolWatermarkCounterIdList: generateBufferPoolCounterIdList: clear_buffer_pool_stats(): SAI_STATUS_SUCCESS

Failure story
May 31 03:08:32.709549 str-a7050-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: generic clear stats key: SAI_OBJECT_TYPE_BUFFER_POOL:oid:0x180000000005f5, fields: 1
May 31 03:08:32.710267 str-a7050-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: wait for clear_stats response
May 31 03:08:32.717710 str-a7050-acs-1 ERR syncd#syncd: :- processEvent: Receive op: clear_stats
May 31 03:08:32.717848 str-a7050-acs-1 ERR syncd#syncd: :- processClearStatsEvent: Object type SAI_OBJECT_TYPE_BUFFER_POOL, about to clear its stats
May 31 03:08:32.717952 str-a7050-acs-1 ERR syncd#syncd: :- processClearStatsEvent: Failed to clear stats
May 31 03:08:32.719083 str-a7050-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: response: key = SAI_STATUS_NOT_SUPPORTED, op = getresponse
May 31 03:08:32.719083 str-a7050-acs-1 ERR swss#orchagent: :- internal_redis_generic_clear_stats: generic clear stats status: SAI_STATUS_NOT_SUPPORTED
May 31 03:08:32.719404 str-a7050-acs-1 ERR swss#orchagent: :- meta_sai_clear_stats_oid: clear status: SAI_STATUS_NOT_SUPPORTED
May 31 03:08:32.719404 str-a7050-acs-1 ERR swss#orchagent: :- generateBufferPoolWatermarkCounterIdList: generateBufferPoolCounterIdList: clear_buffer_pool_stats(): SAI_STATUS_NOT_SUPPORTED

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani
Copy link
Contributor Author

wendani commented May 30, 2019

Need reference pointer advancement to include dcab09f, which has the sai_deserialize_buffer_pool_stat prototype

syncd

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani wendani requested a review from kcudnik June 4, 2019 00:03
syncd/syncd.cpp Outdated Show resolved Hide resolved
the local db

Signed-off-by: Wenda Ni <wenni@microsoft.com>
@sonic-net sonic-net deleted a comment from lguohan Jun 4, 2019
@sonic-net sonic-net deleted a comment from lguohan Jun 4, 2019
@sonic-net sonic-net deleted a comment from lguohan Jun 4, 2019
@wendani wendani requested a review from kcudnik June 4, 2019 17:15
@kcudnik
Copy link
Collaborator

kcudnik commented Jun 4, 2019

please fix compilation issues

@wendani
Copy link
Contributor Author

wendani commented Jun 4, 2019

retest this please

@lguohan
Copy link
Contributor

lguohan commented Jun 7, 2019

still compile issue

Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani
Copy link
Contributor Author

wendani commented Jun 7, 2019

✔️

@wendani wendani merged commit 7830625 into sonic-net:master Jun 8, 2019
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
* Send clear_stats op from orchagent to syncd via Redis pipeline

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Handle clear_stats op in syncd

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Receive clear_stats op status response from sycnd in orchagent context

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Shift clear_stats to get synchronous response from ASIC

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Fix compilation error

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Fix log message output

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove debugging symbols

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove debugging symbols

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Change the validation order of KeyOpFieldsValuesTuple responded from
syncd

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Expand status log utility to include op type as argument

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address comments: check if object id is present in local db

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Leverage newly merged infrastructure to check if object id is present in
the local db

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Fix compile error

Signed-off-by: Wenda Ni <wenni@microsoft.com>
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.

4 participants