diff --git a/cfgmgr/sflowmgr.cpp b/cfgmgr/sflowmgr.cpp index aefcffe8e8e6..b7aeb8bbc18a 100644 --- a/cfgmgr/sflowmgr.cpp +++ b/cfgmgr/sflowmgr.cpp @@ -13,6 +13,7 @@ using namespace swss; map sflowSpeedRateInitMap = { {SFLOW_SAMPLE_RATE_KEY_400G, SFLOW_SAMPLE_RATE_VALUE_400G}, + {SFLOW_SAMPLE_RATE_KEY_200G, SFLOW_SAMPLE_RATE_VALUE_200G}, {SFLOW_SAMPLE_RATE_KEY_100G, SFLOW_SAMPLE_RATE_VALUE_100G}, {SFLOW_SAMPLE_RATE_KEY_50G, SFLOW_SAMPLE_RATE_VALUE_50G}, {SFLOW_SAMPLE_RATE_KEY_40G, SFLOW_SAMPLE_RATE_VALUE_40G}, @@ -229,7 +230,7 @@ void SflowMgr::sflowCheckAndFillValues(string alias, vector &va { string speed = m_sflowPortConfMap[alias].speed; - if (speed != SFLOW_ERROR_SPEED_STR) + if (speed != SFLOW_ERROR_SPEED_STR && sflowSpeedRateInitMap.find(speed) != sflowSpeedRateInitMap.end()) { rate = sflowSpeedRateInitMap[speed]; } diff --git a/cfgmgr/sflowmgr.h b/cfgmgr/sflowmgr.h index 9f1d87cb8a43..8e454efa7a61 100644 --- a/cfgmgr/sflowmgr.h +++ b/cfgmgr/sflowmgr.h @@ -11,6 +11,7 @@ namespace swss { #define SFLOW_SAMPLE_RATE_KEY_400G "400000" +#define SFLOW_SAMPLE_RATE_KEY_200G "200000" #define SFLOW_SAMPLE_RATE_KEY_100G "100000" #define SFLOW_SAMPLE_RATE_KEY_50G "50000" #define SFLOW_SAMPLE_RATE_KEY_40G "40000" @@ -19,6 +20,7 @@ namespace swss { #define SFLOW_SAMPLE_RATE_KEY_1G "1000" #define SFLOW_SAMPLE_RATE_VALUE_400G "40000" +#define SFLOW_SAMPLE_RATE_VALUE_200G "20000" #define SFLOW_SAMPLE_RATE_VALUE_100G "10000" #define SFLOW_SAMPLE_RATE_VALUE_50G "5000" #define SFLOW_SAMPLE_RATE_VALUE_40G "4000"