Skip to content

Add synchronous clear_stats operation path#463

Merged
wendani merged 15 commits intosonic-net:masterfrom
wendani:clear_stats_master
Jun 8, 2019
Merged

Add synchronous clear_stats operation path#463
wendani merged 15 commits intosonic-net:masterfrom
wendani:clear_stats_master

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

@wendani wendani requested review from kcudnik, lguohan and qiluo-msft May 30, 2019 19:14
@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

@wendani wendani requested a review from kcudnik June 4, 2019 00:03
@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 <[email protected]>
@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 <[email protected]>

* Handle clear_stats op in syncd

Signed-off-by: Wenda Ni <[email protected]>

* Receive clear_stats op status response from sycnd in orchagent context

Signed-off-by: Wenda Ni <[email protected]>

* Shift clear_stats to get synchronous response from ASIC

Signed-off-by: Wenda Ni <[email protected]>

* Fix compilation error

Signed-off-by: Wenda Ni <[email protected]>

* Fix log message output

Signed-off-by: Wenda Ni <[email protected]>

* Remove debugging symbols

Signed-off-by: Wenda Ni <[email protected]>

* Remove debugging symbols

Signed-off-by: Wenda Ni <[email protected]>

* Change the validation order of KeyOpFieldsValuesTuple responded from
syncd

Signed-off-by: Wenda Ni <[email protected]>

* Expand status log utility to include op type as argument

Signed-off-by: Wenda Ni <[email protected]>

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

Signed-off-by: Wenda Ni <[email protected]>

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

Signed-off-by: Wenda Ni <[email protected]>

* Fix compile error

Signed-off-by: Wenda Ni <[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.

4 participants