Skip to content
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

[vslib]: Temporaily map DPU switch type to NVDA_MBF2H536C #1259

Merged
merged 5 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions vslib/SwitchConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,25 @@ bool SwitchConfig::parseSwitchType(
{
switchType = SAI_VS_SWITCH_TYPE_NVDA_MBF2H536C;
}
else if (st == SAI_VALUE_VS_SWITCH_TYPE_DPU_SIMU_2P)
{
/*
* TODO: Temporarily set switchType to SAI_VS_SWITCH_TYPE_NVDA_MBF2H536C
* for 2-port DPU. This will need to be revisited when there are other
* DPU types.
*/
switchType = SAI_VS_SWITCH_TYPE_NVDA_MBF2H536C;
}
else
{
SWSS_LOG_ERROR("unknown switch type: '%s', expected (%s|%s|%s|%s)",
SWSS_LOG_ERROR("unknown switch type: '%s', expected (%s|%s|%s|%s|%s|%s)",
switchTypeStr,
SAI_VALUE_VS_SWITCH_TYPE_BCM81724,
SAI_VALUE_VS_SWITCH_TYPE_BCM56850,
SAI_VALUE_VS_SWITCH_TYPE_BCM56971B0,
SAI_VALUE_VS_SWITCH_TYPE_MLNX2700);
SAI_VALUE_VS_SWITCH_TYPE_MLNX2700,
SAI_VALUE_VS_SWITCH_TYPE_NVDA_MBF2H536C,
SAI_VALUE_VS_SWITCH_TYPE_DPU_SIMU_2P);

return false;
}
Expand Down
1 change: 1 addition & 0 deletions vslib/saivs.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ extern "C" {
#define SAI_VALUE_VS_SWITCH_TYPE_BCM81724 "SAI_VS_SWITCH_TYPE_BCM81724"
#define SAI_VALUE_VS_SWITCH_TYPE_MLNX2700 "SAI_VS_SWITCH_TYPE_MLNX2700"
#define SAI_VALUE_VS_SWITCH_TYPE_NVDA_MBF2H536C "SAI_VS_SWITCH_TYPE_NVDA_MBF2H536C"
#define SAI_VALUE_VS_SWITCH_TYPE_DPU_SIMU_2P "SAI_VS_SWITCH_TYPE_DPU_SIMU_2P"

/*
* Values for SAI_KEY_BOOT_TYPE (defined in saiswitch.h)
Expand Down
Loading