File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ void SaiSwitch::getDefaultMacAddress(
140
140
sai_switch_type_t SaiSwitch::getSwitchType () const
141
141
{
142
142
SWSS_LOG_ENTER ();
143
-
144
143
sai_attribute_t attr;
145
144
146
145
attr.id = SAI_SWITCH_ATTR_TYPE;
@@ -149,10 +148,12 @@ sai_switch_type_t SaiSwitch::getSwitchType() const
149
148
150
149
if (status != SAI_STATUS_SUCCESS)
151
150
{
152
- SWSS_LOG_THROW (" failed to get switch type" );
151
+ SWSS_LOG_ERROR (" failed to get switch type with status:0x%x. Assume default SAI_SWITCH_TYPE_NPU" , status);
152
+ // Set to SAI_SWITCH_TYPE_NPU and move on
153
+ attr.value .s32 = SAI_SWITCH_TYPE_NPU;
153
154
}
154
155
155
- SWSS_LOG_ERROR (" switch type: '%s'" , (attr.value .s32 == SAI_SWITCH_TYPE_NPU ? " SAI_SWITCH_TYPE_NPU" : " SAI_SWITCH_TYPE_PHY" ));
156
+ SWSS_LOG_INFO (" switch type: '%s'" , (attr.value .s32 == SAI_SWITCH_TYPE_NPU ? " SAI_SWITCH_TYPE_NPU" : " SAI_SWITCH_TYPE_PHY" ));
156
157
157
158
return (sai_switch_type_t ) attr.value .s32 ;
158
159
}
You can’t perform that action at this time.
0 commit comments