From 725560c5f92987b433d54fabbf8d232faa0d30b7 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 21 Nov 2018 16:52:31 -0800 Subject: [PATCH] [warm boot] Define SAI_SWITCH_ATTR_PRE_SHUTDOWN for warm shutdown (#890) * [warm boot] Define SAI_SWITCH_ATTR_PRE_SHUTDOWN for warm shutdown Signed-off-by: Ying Xie --- inc/saiswitch.h | 19 +++++++++++++++++++ meta/aspell.en.pws | 1 + 2 files changed, 20 insertions(+) diff --git a/inc/saiswitch.h b/inc/saiswitch.h index a1dc737a5..9cf1b40aa 100644 --- a/inc/saiswitch.h +++ b/inc/saiswitch.h @@ -1676,6 +1676,25 @@ typedef enum _sai_switch_attr_t */ SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL, + /** + * @brief Instruct SAI to execute switch pre-shutdown + * + * Indicates controlled switch pre-shutdown as first step of warm shutdown. + * This hint is optional, SAI application could skip this step and + * go directly to warm shutdown. + * This hint should be ignored, if at the time SAI receives this hint, + * SAI_SWITCH_ATTR_RESTART_WARM is NOT already set to TRUE. + * The scope of pre-shutdown is to backup SAI/SDK data, but leave CPU port + * active for some final control plane traffic to go out. + * TRUE - Execute switch pre-shutdown for warm shutdown + * FALSE - No-op, does NOT mean cancelling already executed pre-shutdown + * + * @type bool + * @flags CREATE_AND_SET + * @default false + */ + SAI_SWITCH_ATTR_PRE_SHUTDOWN, + /** * @brief End of attributes */ diff --git a/meta/aspell.en.pws b/meta/aspell.en.pws index b4fa509fb..6ca578fec 100644 --- a/meta/aspell.en.pws +++ b/meta/aspell.en.pws @@ -121,3 +121,4 @@ wildcard www timestamp watchlist +pre