-
Notifications
You must be signed in to change notification settings - Fork 285
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
[mellanox|ffb] use system level warm reboot for Mellanox fastfast boot #400
Conversation
Signed-off-by: Stepan Blyschak <[email protected]>
syncd/syncd.cpp
Outdated
@@ -3683,56 +3679,77 @@ int syncd_main(int argc, char **argv) | |||
FlexCounter::removeAllCounters(); | |||
stopNotificationsProcessingThread(); | |||
|
|||
sai_attribute_t attr; | |||
/* FIXME: Temprary W/A */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temprary [](start = 26, length = 8)
Typo #Closed
syncd/syncd.cpp
Outdated
sai_attribute_t attr; | ||
/* FIXME: Temprary W/A */ | ||
char* platform = getenv("platform"); | ||
if (platform && (strncmp(platform, "mellanox", 8) == 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 [](start = 63, length = 1)
refactor to remove the magic number #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this is good idea to get plafrom like that
syncd/syncd.cpp
Outdated
|
||
/* FIXME: W/A */ | ||
char* platform = getenv("platform"); | ||
if (platform && (strncmp(platform, "mellanox", 8) == 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 [](start = 59, length = 1)
magic number #Closed
syncd/syncd.cpp
Outdated
@@ -3683,56 +3679,77 @@ int syncd_main(int argc, char **argv) | |||
FlexCounter::removeAllCounters(); | |||
stopNotificationsProcessingThread(); | |||
|
|||
sai_attribute_t attr; | |||
/* FIXME: Temprary W/A */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W/A [](start = 35, length = 3)
Could you elaborate why this is a W/A, and what is your future plan? #Closed
syncd/syncd.cpp
Outdated
@@ -3771,6 +3788,15 @@ int syncd_main(int argc, char **argv) | |||
{ | |||
SWSS_LOG_NOTICE("Warm Reboot requested, keeping data plane running"); | |||
|
|||
|
|||
/* FIXME: W/A */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME: W/A [](start = 15, length = 10)
future plan? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comments
syncd/syncd.cpp
Outdated
@@ -1626,6 +1626,26 @@ void InspectAsic() | |||
} | |||
} | |||
|
|||
void mlnxFastFastConfigDone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we have platform specific code in syncd ?
syncd/syncd.cpp
Outdated
* TODO: Mellanox SAI should perform issu start on | ||
* SAI_SWITCH_ATTR_PRE_SHUTDOWN | ||
*/ | ||
int rc = system("/usr/bin/issu --start"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why call some other binary here?
also this code looks similar to one below
if you want to use this please export entire warm section to separate method, since this is already too much code inside this while loop
Signed-off-by: Stepan Blyschak <[email protected]>
…r error status Signed-off-by: Stepan Blyschak <[email protected]>
… as well Signed-off-by: Stepan Blyschak <[email protected]>
…E_ON_REMOVAL Signed-off-by: Stepan Blyschak <[email protected]>
syncd/Makefile.am
Outdated
@@ -37,6 +37,10 @@ syncd_CPPFLAGS += -DSAITHRIFT=yes | |||
syncd_LDADD += -lrpcserver -lthrift | |||
endif | |||
|
|||
if sonic_asic_platform_mellanox | |||
syncd_CPPFLAGS += -DUNINIT_DATA_PLANE_ON_REMOVAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UNINIT_DATA_PLANE_ON_REMOVAL [](start = 20, length = 28)
suggest macro name: SAI_SUPPORT_UNINIT_DATA_PLANE_ON_REMOVAL
to indicate this is a feature, not a specific action.
The UNINIT_DATA_PLANE_ON_REMOVAL may indicate that you want to destroy data plane on removal for Mellanox ASIC.
…-> 'SAI_SUPPORT_UNINIT_DATA_PLANE_ON_REMOVAL' to avoid overlapping with SAI attribute Signed-off-by: Stepan Blyschak <[email protected]>
As all comments were related to code that is currently removed i see no reason why not to approve and merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sonic-net#400) * [mellanox|ffb] use system level warm reboot for Mellanox fastfast boot Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] remove platform check code Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] rename function to onApplyViewInFastFastBoot, check for error status Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] Set UNINIT_DATA_PLANE_ON_REMOVAL in warm shutdown case as well Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] build mellanox with -DSAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] rename 'SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL' -> 'SAI_SUPPORT_UNINIT_DATA_PLANE_ON_REMOVAL' to avoid overlapping with SAI attribute Signed-off-by: Stepan Blyschak <[email protected]>
sonic-net#400) * [mellanox|ffb] use system level warm reboot for Mellanox fastfast boot Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] remove platform check code Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] rename function to onApplyViewInFastFastBoot, check for error status Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] Set UNINIT_DATA_PLANE_ON_REMOVAL in warm shutdown case as well Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] build mellanox with -DSAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL Signed-off-by: Stepan Blyschak <[email protected]> * [mellanox|ffb] rename 'SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL' -> 'SAI_SUPPORT_UNINIT_DATA_PLANE_ON_REMOVAL' to avoid overlapping with SAI attribute Signed-off-by: Stepan Blyschak <[email protected]>
use common warm boot flow for mellanox fastfast boot.
Signed-off-by: Stepan Blyschak [email protected]