Skip to content

Commit

Permalink
Ignore removing switch for mellanox platform due to known limitation (s…
Browse files Browse the repository at this point in the history
…onic-net#1216)

* Ignore removing switch for mellanox platform due to known limitation

* Fix review comment

* Fix review comment
  • Loading branch information
Junchao-Mellanox authored and StormLiangMS committed Mar 19, 2023
1 parent 4f80d59 commit 62aa244
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ AX_ADD_AM_MACRO_STATIC([])

AM_CONDITIONAL(SONIC_ASIC_PLATFORM_BAREFOOT, test x$CONFIGURED_PLATFORM = xbarefoot)
AM_CONDITIONAL(SONIC_ASIC_PLATFORM_BROADCOM, test x$CONFIGURED_PLATFORM = xbroadcom)
AM_CONDITIONAL(SONIC_ASIC_PLATFORM_MELLANOX, test x$CONFIGURED_PLATFORM = xmellanox)

AM_COND_IF([SONIC_ASIC_PLATFORM_MELLANOX],
AC_DEFINE([MELLANOX], [1], [Define to 1 on Mellanox Platform]))

AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging],
Expand Down
11 changes: 10 additions & 1 deletion syncd/Syncd.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "config.h"
#include "Syncd.h"
#include "VidManager.h"
#include "NotificationHandler.h"
Expand Down Expand Up @@ -4729,7 +4730,15 @@ void Syncd::run()

m_mdioIpcServer->stopMdioThread();

sai_status_t status = removeAllSwitches();
sai_status_t status = SAI_STATUS_SUCCESS;
#ifdef MELLANOX
if (shutdownType != SYNCD_RESTART_TYPE_COLD)
{
status = removeAllSwitches();
}
#else
status = removeAllSwitches();
#endif

// Stop notification thread after removing switch
m_processor->stopNotificationsProcessingThread();
Expand Down

0 comments on commit 62aa244

Please sign in to comment.