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

[fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot #1100

Merged
merged 2 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ void Syncd::performStartupLogic()
{
SWSS_LOG_ENTER();

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

if (m_isWarmStart && (m_commandLineOptions->m_startType != SAI_START_TYPE_FASTFAST_BOOT))
if (m_isWarmStart && m_commandLineOptions->m_startType != SAI_START_TYPE_FASTFAST_BOOT && m_commandLineOptions->m_startType != SAI_START_TYPE_FAST_BOOT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be better if this condition checks for positive match for SAI_START_TYPE_WARM_BOOT instead of a negative match for fastfast and fast reboot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case the assignment in line 214: "m_commandLineOptions->m_startType = SAI_START_TYPE_WARM_BOOT;" is redundant, not?
Should I change to the positive match and remove the redundancy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think?

{
SWSS_LOG_WARN("override command line startType=%s via SAI_START_TYPE_WARM_BOOT",
CommandLineOptions::startTypeToString(m_commandLineOptions->m_startType).c_str());
Expand Down
6 changes: 4 additions & 2 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ else
CMD_ARGS=
fi

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

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