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

Threshold feature Orch changes. #1067

Closed
wants to merge 10 commits into from
2 changes: 2 additions & 0 deletions orchagent/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ orchagent_SOURCES = \
watermarkorch.cpp \
policerorch.cpp \
sfloworch.cpp \
tam.cpp \
thresholdorch.cpp \
chassisorch.cpp \
debugcounterorch.cpp \
natorch.cpp
Expand Down
9 changes: 9 additions & 0 deletions orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern sai_object_id_t gSwitchId;
extern bool gSaiRedisLogRotate;

extern void syncd_apply_view();

/*
* Global orch daemon variables
*/
Expand Down Expand Up @@ -270,6 +271,12 @@ bool OrchDaemon::init()
TableConnector stateDbSwitchTable(m_stateDb, "SWITCH_CAPABILITY");
gAclOrch = new AclOrch(acl_table_connectors, stateDbSwitchTable, gPortsOrch, mirror_orch, gNeighOrch, gRouteOrch, dtel_orch);

vector<string> thresOrch_tables = {
CFG_THRESHOLD_TABLE_NAME
};

ThresholdOrch *thres_orch = new ThresholdOrch(m_configDb, thresOrch_tables, gPortsOrch);

m_orchList.push_back(gFdbOrch);
m_orchList.push_back(mirror_orch);
m_orchList.push_back(gAclOrch);
Expand All @@ -281,8 +288,10 @@ bool OrchDaemon::init()
m_orchList.push_back(cfg_vnet_rt_orch);
m_orchList.push_back(vnet_orch);
m_orchList.push_back(vnet_rt_orch);
m_orchList.push_back(thres_orch);
m_orchList.push_back(gNatOrch);


m_select = new Select();

vector<string> flex_counter_tables = {
Expand Down
1 change: 1 addition & 0 deletions orchagent/orchdaemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "sfloworch.h"
#include "debugcounterorch.h"
#include "directory.h"
#include "thresholdorch.h"
#include "natorch.h"

using namespace swss;
Expand Down
5 changes: 5 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,11 @@ void PortsOrch::doPortTask(Consumer &consumer)
if (!m_initDone)
{
m_initDone = true;
/* PG and queue maps per port need to be created
* after this step for the threshold feature.
*/
generateQueueMap();
generatePriorityGroupMap();
SWSS_LOG_INFO("Get PortInitDone notification from portsyncd.");
}

Expand Down
3 changes: 3 additions & 0 deletions orchagent/saihelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sai_mirror_api_t* sai_mirror_api;
sai_fdb_api_t* sai_fdb_api;
sai_dtel_api_t* sai_dtel_api;
sai_bmtor_api_t* sai_bmtor_api;
sai_tam_api_t* sai_tam_api;
sai_samplepacket_api_t* sai_samplepacket_api;
sai_debug_counter_api_t* sai_debug_counter_api;
sai_nat_api_t* sai_nat_api;
Expand Down Expand Up @@ -133,6 +134,7 @@ void initSaiApi()
sai_api_query(SAI_API_ACL, (void **)&sai_acl_api);
sai_api_query(SAI_API_DTEL, (void **)&sai_dtel_api);
sai_api_query((sai_api_t)SAI_API_BMTOR, (void **)&sai_bmtor_api);
sai_api_query(SAI_API_TAM, (void **)&sai_tam_api);
sai_api_query(SAI_API_SAMPLEPACKET, (void **)&sai_samplepacket_api);
sai_api_query(SAI_API_DEBUG_COUNTER, (void **)&sai_debug_counter_api);
sai_api_query(SAI_API_NAT, (void **)&sai_nat_api);
Expand Down Expand Up @@ -162,6 +164,7 @@ void initSaiApi()
sai_log_set(SAI_API_ACL, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_DTEL, SAI_LOG_LEVEL_NOTICE);
sai_log_set((sai_api_t)SAI_API_BMTOR, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_TAM, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_SAMPLEPACKET, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_DEBUG_COUNTER, SAI_LOG_LEVEL_NOTICE);
sai_log_set((sai_api_t)SAI_API_NAT, SAI_LOG_LEVEL_NOTICE);
Expand Down
Loading