Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
slogan621 committed Jun 19, 2020
1 parent 4942ac1 commit 8695a23
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/src/RedisChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ sai_status_t RedisChannel::wait(

swss::Selectable *sel;

int result = s.select(&sel, REDIS_ASIC_STATE_COMMAND_GETRESPONSE_TIMEOUT_MS * 10);
int result = s.select(&sel, REDIS_ASIC_STATE_COMMAND_GETRESPONSE_TIMEOUT_MS);

if (result == swss::Select::OBJECT)
{
Expand Down
8 changes: 4 additions & 4 deletions syncd/SaiSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SaiSwitch::SaiSwitch(

if (getSwitchType() == SAI_SWITCH_TYPE_NPU)
{
helperCheckLaneMap();
helperCheckLaneMap();
}

helperLoadColdVids();
Expand All @@ -70,7 +70,7 @@ SaiSwitch::SaiSwitch(

if (getSwitchType() == SAI_SWITCH_TYPE_NPU)
{
saiGetMacAddress(m_default_mac_address);
saiGetMacAddress(m_default_mac_address);
}

if (warmBoot)
Expand Down Expand Up @@ -149,7 +149,7 @@ sai_switch_type_t SaiSwitch::getSwitchType() const

if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("failed to get switch type");
SWSS_LOG_THROW("failed to get switch type");
}

SWSS_LOG_ERROR("switch type: '%s'", (attr.value.s32 == SAI_SWITCH_TYPE_NPU ? "SAI_SWITCH_TYPE_NPU" : "SAI_SWITCH_TYPE_PHY"));
Expand Down Expand Up @@ -911,7 +911,7 @@ void SaiSwitch::helperPopulateWarmBootVids()
{
sai_object_id_t vid = m_translator->translateRidToVid(rid, m_switch_vid);

m_warmBootDiscoveredVids.insert(vid);
m_warmBootDiscoveredVids.insert(vid);
}
}

Expand Down
2 changes: 1 addition & 1 deletion vslib/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ libSaiVS_a_SOURCES = \
SelectableFd.cpp \
SwitchState.cpp \
SwitchBCM56850.cpp \
SwitchBCM81724.cpp \
SwitchBCM81724.cpp \
SwitchMLNX2700.cpp

libsaivs_la_SOURCES = \
Expand Down
8 changes: 4 additions & 4 deletions vslib/src/Sai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ sai_status_t Sai::initialize(
{
SWSS_LOG_NOTICE("failed to obtain service method table value: %s", SAI_KEY_VS_SAI_SWITCH_TYPE);
saiSwitchType = SAI_SWITCH_TYPE_NPU;
} else if (!SwitchConfig::parseSaiSwitchType(sai_switch_type, saiSwitchType))
}
else if (!SwitchConfig::parseSaiSwitchType(sai_switch_type, saiSwitchType))
{
return SAI_STATUS_FAILURE;
return SAI_STATUS_FAILURE;
}

auto *laneMapFile = service_method_table->profile_get_value(0, SAI_KEY_VS_INTERFACE_LANE_MAP_FILE);
Expand Down Expand Up @@ -176,8 +177,7 @@ sai_status_t Sai::initialize(

if (saiSwitchType == SAI_SWITCH_TYPE_NPU)
{

startFdbAgingThread();
startFdbAgingThread();
}

m_apiInitialized = true;
Expand Down
2 changes: 1 addition & 1 deletion vslib/src/SwitchConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool SwitchConfig::parseSwitchType(
}
else
{
SWSS_LOG_ERROR("unknown switch type: '%s', expected (%s|%s)(%s)",
SWSS_LOG_ERROR("unknown switch type: '%s', expected (%s|%s|%s)",
switchTypeStr,
SAI_VALUE_VS_SWITCH_TYPE_BCM81724,
SAI_VALUE_VS_SWITCH_TYPE_BCM56850,
Expand Down

0 comments on commit 8695a23

Please sign in to comment.