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

orchagent_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
Expand Down
8 changes: 8 additions & 0 deletions orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern sai_switch_api_t* sai_switch_api;
extern sai_object_id_t gSwitchId;

extern void syncd_apply_view();

/*
* Global orch daemon variables
*/
Expand Down Expand Up @@ -244,6 +245,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 @@ -255,6 +262,7 @@ 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_select = new Select();

Expand Down
1 change: 1 addition & 0 deletions orchagent/orchdaemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "policerorch.h"
#include "sfloworch.h"
#include "directory.h"
#include "thresholdorch.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 @@ -1556,6 +1556,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;

extern sai_object_id_t gSwitchId;
Expand Down Expand Up @@ -131,6 +132,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_log_set(SAI_API_SWITCH, SAI_LOG_LEVEL_NOTICE);
Expand Down Expand Up @@ -158,6 +160,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);
}

Expand Down
Loading