Skip to content

Commit 62aa244

Browse files
Junchao-MellanoxStormLiangMS
authored andcommitted
Ignore removing switch for mellanox platform due to known limitation (#1216)
* Ignore removing switch for mellanox platform due to known limitation * Fix review comment * Fix review comment
1 parent 4f80d59 commit 62aa244

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ AX_ADD_AM_MACRO_STATIC([])
1717

1818
AM_CONDITIONAL(SONIC_ASIC_PLATFORM_BAREFOOT, test x$CONFIGURED_PLATFORM = xbarefoot)
1919
AM_CONDITIONAL(SONIC_ASIC_PLATFORM_BROADCOM, test x$CONFIGURED_PLATFORM = xbroadcom)
20+
AM_CONDITIONAL(SONIC_ASIC_PLATFORM_MELLANOX, test x$CONFIGURED_PLATFORM = xmellanox)
21+
22+
AM_COND_IF([SONIC_ASIC_PLATFORM_MELLANOX],
23+
AC_DEFINE([MELLANOX], [1], [Define to 1 on Mellanox Platform]))
2024

2125
AC_ARG_ENABLE(debug,
2226
[ --enable-debug turn on debugging],

syncd/Syncd.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "config.h"
12
#include "Syncd.h"
23
#include "VidManager.h"
34
#include "NotificationHandler.h"
@@ -4729,7 +4730,15 @@ void Syncd::run()
47294730

47304731
m_mdioIpcServer->stopMdioThread();
47314732

4732-
sai_status_t status = removeAllSwitches();
4733+
sai_status_t status = SAI_STATUS_SUCCESS;
4734+
#ifdef MELLANOX
4735+
if (shutdownType != SYNCD_RESTART_TYPE_COLD)
4736+
{
4737+
status = removeAllSwitches();
4738+
}
4739+
#else
4740+
status = removeAllSwitches();
4741+
#endif
47334742

47344743
// Stop notification thread after removing switch
47354744
m_processor->stopNotificationsProcessingThread();

0 commit comments

Comments
 (0)