Skip to content

Commit 07028cb

Browse files
authored
[fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot (sonic-net#1100)
Fast-reboot is utilizing warm-reboot infrastructure to improve its performance, but it should ignore warm-boot logic when syncd starts in fast-boot. As well it shouldn't use temporary view between init and apply.
1 parent ab344e9 commit 07028cb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

syncd/Syncd.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ void Syncd::performStartupLogic()
204204
{
205205
SWSS_LOG_ENTER();
206206

207-
// ignore warm logic here if syncd starts in Mellanox fastfast boot mode
207+
// ignore warm logic here if syncd starts in fast-boot or Mellanox fastfast boot mode
208208

209-
if (m_isWarmStart && (m_commandLineOptions->m_startType != SAI_START_TYPE_FASTFAST_BOOT))
209+
if (m_isWarmStart && m_commandLineOptions->m_startType != SAI_START_TYPE_FASTFAST_BOOT && m_commandLineOptions->m_startType != SAI_START_TYPE_FAST_BOOT)
210210
{
211211
SWSS_LOG_WARN("override command line startType=%s via SAI_START_TYPE_WARM_BOOT",
212212
CommandLineOptions::startTypeToString(m_commandLineOptions->m_startType).c_str());

syncd/scripts/syncd_init_common.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ else
2626
CMD_ARGS=
2727
fi
2828

29-
# Use temporary view between init and apply
30-
CMD_ARGS+=" -u"
29+
# Use temporary view between init and apply except when in fast-reboot
30+
if [[ "$(cat /proc/cmdline)" != *"SONIC_BOOT_TYPE=fast-reboot"* ]]; then
31+
CMD_ARGS+=" -u"
32+
fi
3133

3234
# Use bulk APIs in SAI
3335
# currently disabled since most vendors don't support that yet

0 commit comments

Comments
 (0)