-
Notifications
You must be signed in to change notification settings - Fork 545
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
fixed unsupported resource issue #1641
fixed unsupported resource issue #1641
Conversation
Signed-off-by: Prabhu Sreenivasan <[email protected]>
/Azurepipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -439,6 +439,10 @@ void CrmOrch::getResAvailableCounters() | |||
sai_attribute_t attr; | |||
attr.id = crmResSaiAvailAttrMap.at(res.first); | |||
|
|||
// ignore unsupported resources | |||
if (res.second.resStatus != CrmResourceStatus::CRM_RES_SUPPORTED) | |||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PrabhuSreenivasan please use { }
notation and move it at the beginning of the loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nazariig , Thanks. I have made the suggested changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Prabhu Sreenivasan <[email protected]>
Fix sonic-net/sonic-buildimage#6563 **What I did** Instead of erasing unsupported resource from m_resourcesMap, mark it as unsupported. **Why I did it** Erasing an entry while iterating using range based iterator makes the iterator invalid. Also removing a resource from the m_resourcesMap impacts cross access while iterating other maps (eg crmUsedCntsTableMap). **How I verified it** Added a new unsupported resource for testing and verified the logs.
Fix sonic-net/sonic-buildimage#6563 **What I did** Instead of erasing unsupported resource from m_resourcesMap, mark it as unsupported. **Why I did it** Erasing an entry while iterating using range based iterator makes the iterator invalid. Also removing a resource from the m_resourcesMap impacts cross access while iterating other maps (eg crmUsedCntsTableMap). **How I verified it** Added a new unsupported resource for testing and verified the logs.
Fix sonic-net/sonic-buildimage#6563 **What I did** Instead of erasing unsupported resource from m_resourcesMap, mark it as unsupported. **Why I did it** Erasing an entry while iterating using range based iterator makes the iterator invalid. Also removing a resource from the m_resourcesMap impacts cross access while iterating other maps (eg crmUsedCntsTableMap). **How I verified it** Added a new unsupported resource for testing and verified the logs.
…c-net#1641) * [console][show] Force refresh all lines status during show line * Fix UTs Signed-off-by: Jing Kan [email protected]
Signed-off-by: Prabhu Sreenivasan [email protected]
Fix sonic-net/sonic-buildimage#6563
What I did
Instead of erasing unsupported resource from m_resourcesMap, mark it as unsupported.
Why I did it
Erasing an entry while iterating using range based iterator makes the iterator invalid.
Also removing a resource from the m_resourcesMap impacts cross access while iterating other maps (eg crmUsedCntsTableMap).
How I verified it
Added a new unsupported resource for testing and verified the logs.
Details if related