Skip to content

Commit

Permalink
syncd: Enabling SAI_SWITCH_ATTR_SWITCH_SHELL_ENABLE (sonic-net#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
stcheng authored and lguohan committed Sep 17, 2016
1 parent 76478d7 commit 8893e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/saiserialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ sai_serialization_map_t sai_get_serialization_map()
map[SAI_OBJECT_TYPE_SWITCH][SAI_SWITCH_ATTR_INGRESS_BUFFER_POOL_NUM] = SAI_SERIALIZATION_TYPE_UINT32;
map[SAI_OBJECT_TYPE_SWITCH][SAI_SWITCH_ATTR_QOS_MAX_NUMBER_OF_CHILDS_PER_SCHEDULER_GROUP] = SAI_SERIALIZATION_TYPE_INT32;
map[SAI_OBJECT_TYPE_SWITCH][SAI_SWITCH_ATTR_DEFAULT_TRAP_GROUP] = SAI_SERIALIZATION_TYPE_OBJECT_ID;
map[SAI_OBJECT_TYPE_SWITCH][SAI_SWITCH_ATTR_SWITCH_SHELL_ENABLE] = SAI_SERIALIZATION_TYPE_BOOL;

map[SAI_OBJECT_TYPE_FDB][SAI_FDB_ENTRY_ATTR_TYPE] = SAI_SERIALIZATION_TYPE_INT32;
map[SAI_OBJECT_TYPE_FDB][SAI_FDB_ENTRY_ATTR_PORT_ID] = SAI_SERIALIZATION_TYPE_OBJECT_ID;
Expand Down
5 changes: 3 additions & 2 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ void sai_diag_shell()
while (true)
{
sai_attribute_t attr;
attr.id = SAI_SWITCH_ATTR_CUSTOM_RANGE_BASE + 1;
attr.id = SAI_SWITCH_ATTR_SWITCH_SHELL_ENABLE;
attr.value.booldata = true;
status = sai_switch_api->set_switch_attribute(&attr);
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("open sai shell failed %d", status);
SWSS_LOG_ERROR("Failed to enable switch shell %d", status);
return;
}

Expand Down

0 comments on commit 8893e29

Please sign in to comment.