-
Notifications
You must be signed in to change notification settings - Fork 278
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
Fix for credo gbsyncd warm-reboot #1499
base: master
Are you sure you want to change the base?
Conversation
More attributes are needed for the create_switch of credo gbsyncd warm-boot. The fix here is to pass all the attributes when SAI_SWITCH_ATTR_TYPE is SAI_SWITCH_TYPE_PHY.
firstRun being true disallows the start of warm-reboot. It was set to true when no switch attributes is found under the key of HIDDEN* in ASIC_DB or GB_ASIC_DB. However, all such attributes are unrelated to the credo gbsyncd, so hasNoHiddenKeysDefined is always true for gbsyncd. The fix here is to determine the first run also based on no switch objects has been created in ASIC_DB or GB_ASIC_DB.
… supported SAI_SWITCH_ATTR_DEFAULT_TRAP_GROUP is not supported by credo gbsyncd. Skip the steps related to it when it is not available
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This needs to be discussed, nice passing more attributes in warm boot make no sense, by design warm boot should have the same attributes after warm boot. Exception is attributes pointers which changes because of memory allocation for syncd process and hardware info to point which switch should be instantiated. If you are changing this then there is some issue inside libsai in vendor code for warm boot |
@@ -61,9 +61,26 @@ ComparisonLogic::ComparisonLogic( | |||
|
|||
// TODO needs to be removed and done in generic | |||
|
|||
m_current->m_defaultTrapGroupRid = m_switch->getSwitchDefaultAttrOid(SAI_SWITCH_ATTR_DEFAULT_TRAP_GROUP); | |||
m_temp->m_defaultTrapGroupRid = m_switch->getSwitchDefaultAttrOid(SAI_SWITCH_ATTR_DEFAULT_TRAP_GROUP); | |||
try |
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.
Why tis is modified?
@@ -691,6 +691,15 @@ bool RedisClient::hasNoHiddenKeysDefined() const | |||
return keys.size() == 0; | |||
} | |||
|
|||
bool RedisClient::hasNoSwitchDefined() const |
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.
Why there would be no switch? What is purpose of this? You have flag isveryfirstrun
@@ -4645,7 +4645,16 @@ void Syncd::performWarmRestartSingleSwitch( | |||
sai_attribute_t *attrList = list.get_attr_list(); | |||
|
|||
uint32_t attrCount = list.get_attr_count(); | |||
|
|||
bool isPhy = false; | |||
for (uint32_t idx = 0; idx < attrCount; idx++) |
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.
There is a function for that in sai utils
@@ -4662,7 +4671,7 @@ void Syncd::performWarmRestartSingleSwitch( | |||
* new process could be loaded at different address space. | |||
*/ | |||
|
|||
if (id == SAI_SWITCH_ATTR_SWITCH_HARDWARE_INFO || meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_POINTER) | |||
if (isPhy || id == SAI_SWITCH_ATTR_SWITCH_HARDWARE_INFO || meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_POINTER) |
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.
You can pass all attributes, look at my comment in main thread
@@ -5103,7 +5112,7 @@ bool Syncd::isVeryFirstRun() | |||
* this is first run, let's query HIDDEN ? | |||
*/ | |||
|
|||
bool firstRun = m_client->hasNoHiddenKeysDefined(); | |||
bool firstRun = m_client->hasNoHiddenKeysDefined() && m_client->hasNoSwitchDefined(); |
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.
You already have flag isveryfirst run, why this is modified?
To support credo gbsyncd warm-reboot, we found several issues to be fixed in sonic-sairedis as follows: