Skip to content

Commit

Permalink
[hash]: Implement GH backend (sonic-net#2598)
Browse files Browse the repository at this point in the history
* [hash]: Implement GH backend as per HLD: sonic-net/SONiC#1101
  • Loading branch information
nazariig authored and theasianpianist committed Jul 20, 2023
1 parent a6c0a5f commit 75dd6b5
Show file tree
Hide file tree
Showing 17 changed files with 1,075 additions and 6 deletions.
3 changes: 3 additions & 0 deletions orchagent/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
INCLUDES = -I $(top_srcdir)/lib \
-I $(top_srcdir) \
-I $(top_srcdir)/warmrestart \
-I switch \
-I flex_counter \
-I debug_counter \
-I pbh \
Expand Down Expand Up @@ -73,6 +74,8 @@ orchagent_SOURCES = \
pbhorch.cpp \
saihelper.cpp \
saiattr.cpp \
switch/switch_capabilities.cpp \
switch/switch_helper.cpp \
switchorch.cpp \
pfcwdorch.cpp \
pfcactionhandler.cpp \
Expand Down
4 changes: 3 additions & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ bool OrchDaemon::init()

gCrmOrch = new CrmOrch(m_configDb, CFG_CRM_TABLE_NAME);

TableConnector stateDbSwitchTable(m_stateDb, "SWITCH_CAPABILITY");
TableConnector stateDbSwitchTable(m_stateDb, STATE_SWITCH_CAPABILITY_TABLE_NAME);
TableConnector app_switch_table(m_applDb, APP_SWITCH_TABLE_NAME);
TableConnector conf_asic_sensors(m_configDb, CFG_ASIC_SENSORS_TABLE_NAME);
TableConnector conf_switch_hash(m_configDb, CFG_SWITCH_HASH_TABLE_NAME);

vector<TableConnector> switch_tables = {
conf_switch_hash,
conf_asic_sensors,
app_switch_table
};
Expand Down
2 changes: 2 additions & 0 deletions orchagent/p4orch/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ p4orch_tests_SOURCES = $(ORCHAGENT_DIR)/orch.cpp \
$(ORCHAGENT_DIR)/vrforch.cpp \
$(ORCHAGENT_DIR)/vxlanorch.cpp \
$(ORCHAGENT_DIR)/copporch.cpp \
$(ORCHAGENT_DIR)/switch/switch_capabilities.cpp \
$(ORCHAGENT_DIR)/switch/switch_helper.cpp \
$(ORCHAGENT_DIR)/switchorch.cpp \
$(ORCHAGENT_DIR)/request_parser.cpp \
$(ORCHAGENT_DIR)/flex_counter/flex_counter_manager.cpp \
Expand Down
3 changes: 3 additions & 0 deletions orchagent/p4orch/tests/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ sai_acl_api_t *sai_acl_api;
sai_policer_api_t *sai_policer_api;
sai_virtual_router_api_t *sai_virtual_router_api;
sai_hostif_api_t *sai_hostif_api;
sai_hash_api_t *sai_hash_api;
sai_switch_api_t *sai_switch_api;
sai_mirror_api_t *sai_mirror_api;
sai_udf_api_t *sai_udf_api;
Expand Down Expand Up @@ -191,6 +192,7 @@ int main(int argc, char *argv[])
sai_policer_api_t policer_api;
sai_virtual_router_api_t virtual_router_api;
sai_hostif_api_t hostif_api;
sai_hash_api_t hash_api;
sai_switch_api_t switch_api;
sai_mirror_api_t mirror_api;
sai_udf_api_t udf_api;
Expand All @@ -207,6 +209,7 @@ int main(int argc, char *argv[])
sai_policer_api = &policer_api;
sai_virtual_router_api = &virtual_router_api;
sai_hostif_api = &hostif_api;
sai_hash_api = &hash_api;
sai_switch_api = &switch_api;
sai_mirror_api = &mirror_api;
sai_udf_api = &udf_api;
Expand Down
Loading

0 comments on commit 75dd6b5

Please sign in to comment.