Skip to content

Commit 8b2d815

Browse files
committed
set default SAI_SWITCH_ATTR_TYPE attr in SwitchStateBase to SAI_SWITCH_TYPE_NPU. override to SAI_SWITCH_TYPE_PHY in SwitchBCM81724
1 parent 66db297 commit 8b2d815

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

vslib/src/SwitchBCM81724.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ sai_status_t SwitchBCM81724::set_switch_default_attributes()
160160

161161
CHECK_STATUS(set(SAI_OBJECT_TYPE_SWITCH, m_switch_id, &attr));
162162

163+
attr.id = SAI_SWITCH_ATTR_TYPE;
164+
attr.value.s32 = SAI_SWITCH_TYPE_PHY;
165+
163166
CHECK_STATUS(set(SAI_OBJECT_TYPE_SWITCH, m_switch_id, &attr));
164167

165168
attr.id = SAI_SWITCH_ATTR_FIRMWARE_MAJOR_VERSION;

vslib/src/SwitchStateBase.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,11 @@ sai_status_t SwitchStateBase::set_switch_default_attributes()
721721

722722
CHECK_STATUS(set(SAI_OBJECT_TYPE_SWITCH, m_switch_id, &attr));
723723

724+
attr.id = SAI_SWITCH_ATTR_TYPE;
725+
attr.value.s32 = SAI_SWITCH_TYPE_NPU;
726+
727+
CHECK_STATUS(set(SAI_OBJECT_TYPE_SWITCH, m_switch_id, &attr));
728+
724729
attr.id = SAI_SWITCH_ATTR_WARM_RECOVER;
725730
attr.value.booldata = false;
726731

0 commit comments

Comments
 (0)