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

[PfcWd]: Make polling interval configurable #435

Merged
merged 3 commits into from
Feb 7, 2018

Conversation

sihuihan88
Copy link
Contributor

@sihuihan88 sihuihan88 commented Jan 25, 2018

Signed-off-by: Sihui Han sihan@microsoft.com

What I did
Make the polling interval configurable
Why I did it
Extend the feature.
How I verified it
Test on DUT
Details if related

@sihuihan88
Copy link
Contributor Author

sihuihan88 commented Jan 25, 2018

@lguohan
Copy link
Contributor

lguohan commented Jan 25, 2018

retest this please

@@ -108,7 +109,7 @@ class PfcWdSwOrch: public PfcWdOrch<DropHandler, ForwardHandler>
const vector<sai_queue_attr_t> c_queueAttrIds;

shared_ptr<DBConnector> m_pfcWdDb = nullptr;
shared_ptr<ProducerStateTable> m_pfcWdTable = nullptr;
shared_ptr<ProducerTable> m_pfcWdTable = nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why switch to ProducerTable?

Copy link
Contributor

Choose a reason for hiding this comment

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

same questions here.

Copy link
Contributor Author

@sihuihan88 sihuihan88 Jan 27, 2018

Choose a reason for hiding this comment

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

With producerstatetable/consumerstatetable, when producer wants to set a single field, the consumer will receive the state of all the fields of the key and set them one more time. Eg. We set F1 v1. first, and then when setting F2 v2 later, consumer can still receive F1 V1 when handling F2 V2 and set F1 V1 one more time. This is not ideal as we have the use case to change the value of a single field. Besides, using statetable will trigger the current syncd error that the same plugin is added more than once in addQueueCounterPlugins function, and that's how I figure this out.

Since we do not set the field value for a single key for flexcounter frequently in a very short time, there is no benefit to use statetable, but results in more overhead. So switch to producertable/cosumertable.

We can remove syncd error log in addQueueCounterPlugins and use stateTable, though I cannot see the benefit of using stateTable.

const auto &field = fvField(valuePair);
const auto &value = fvValue(valuePair);

if (field == POLL_INTERVAL_FIELD)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a benefit of making this field global and not per port? If yes, what will happen in case if I will enable WD on some port(s) without setting global polling interval?

Copy link
Contributor Author

@sihuihan88 sihuihan88 Jan 27, 2018

Choose a reason for hiding this comment

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

Polling interval is global by design. It will use the default value if poll interval is not set specifically.

@sihuihan88 sihuihan88 force-pushed the dev/sihan/flex branch 3 times, most recently from d69f5fc to e85e431 Compare January 30, 2018 00:00
Sihui Han added 2 commits February 6, 2018 21:38
Signed-off-by: Sihui Han <sihan@microsoft.com>
@sihuihan88
Copy link
Contributor Author

retest this please

Signed-off-by: Sihui Han <sihan@microsoft.com>
@sihuihan88 sihuihan88 merged commit 9a037b8 into sonic-net:master Feb 7, 2018
@sihuihan88 sihuihan88 deleted the dev/sihan/flex branch February 7, 2018 23:29
rodnymolina pushed a commit to rodnymolina/sonic-swss that referenced this pull request Feb 14, 2018
* [PfcWd]: Make polling interval configurable

Signed-off-by: Sihui Han <sihan@microsoft.com>

* rebase master

* fix the build error

Signed-off-by: Sihui Han <sihan@microsoft.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
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.

3 participants