Skip to content

Commit

Permalink
Changes to support SONiC Gearbox Manager (#347)
Browse files Browse the repository at this point in the history
add class GearboxUtils, contains APIs useful for gearbox support across various submodules.

add additional REDIS tables to support second (PHY) syncd.

Signed-off-by: syd.logan@broadcom.com
  • Loading branch information
sydlogan authored Jun 16, 2020
1 parent 58ca4d9 commit 292b08a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
15 changes: 15 additions & 0 deletions common/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
"id" : 7,
"separator": "|",
"instance" : "redis"
},
"GB_ASIC_DB" : {
"id" : 8,
"separator": "|",
"instance" : "redis"
},
"GB_COUNTERS_DB" : {
"id" : 9,
"separator": "|",
"instance" : "redis"
},
"GB_FLEX_COUNTER_DB" : {
"id" : 10,
"separator": "|",
"instance" : "redis"
}
},
"VERSION" : "1.0"
Expand Down
6 changes: 6 additions & 0 deletions common/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ namespace swss {
#define FLEX_COUNTER_DB 5
#define STATE_DB 6
#define SNMP_OVERLAY_DB 7
#define GB_ASIC_DB 8
#define GB_COUNTERS_DB 9
#define GB_FLEX_COUNTER_DB 10

/***** APPLICATION DATABASE *****/

#define APP_PORT_TABLE_NAME "PORT_TABLE"
#define APP_GEARBOX_TABLE_NAME "GEARBOX_TABLE"
#define APP_VLAN_TABLE_NAME "VLAN_TABLE"
#define APP_VLAN_MEMBER_TABLE_NAME "VLAN_MEMBER_TABLE"
#define APP_LAG_TABLE_NAME "LAG_TABLE"
Expand Down Expand Up @@ -159,6 +163,8 @@ namespace swss {
#define CFG_PORT_TABLE_NAME "PORT"
#define CFG_PORT_CABLE_LEN_TABLE_NAME "CABLE_LENGTH"

#define CFG_GEARBOX_TABLE_NAME "GEARBOX"

#define CFG_INTF_TABLE_NAME "INTERFACE"
#define CFG_LOOPBACK_INTERFACE_TABLE_NAME "LOOPBACK_INTERFACE"
#define CFG_MGMT_INTERFACE_TABLE_NAME "MGMT_INTERFACE"
Expand Down
19 changes: 11 additions & 8 deletions common/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ const std::string TableBase::TABLE_NAME_SEPARATOR_COLON = ":";
const std::string TableBase::TABLE_NAME_SEPARATOR_VBAR = "|";

const TableNameSeparatorMap TableBase::tableNameSeparatorMap = {
{ APPL_DB, TABLE_NAME_SEPARATOR_COLON },
{ ASIC_DB, TABLE_NAME_SEPARATOR_COLON },
{ COUNTERS_DB, TABLE_NAME_SEPARATOR_COLON },
{ LOGLEVEL_DB, TABLE_NAME_SEPARATOR_COLON },
{ CONFIG_DB, TABLE_NAME_SEPARATOR_VBAR },
{ PFC_WD_DB, TABLE_NAME_SEPARATOR_COLON },
{ FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_COLON },
{ STATE_DB, TABLE_NAME_SEPARATOR_VBAR }
{ APPL_DB, TABLE_NAME_SEPARATOR_COLON },
{ ASIC_DB, TABLE_NAME_SEPARATOR_COLON },
{ COUNTERS_DB, TABLE_NAME_SEPARATOR_COLON },
{ LOGLEVEL_DB, TABLE_NAME_SEPARATOR_COLON },
{ CONFIG_DB, TABLE_NAME_SEPARATOR_VBAR },
{ PFC_WD_DB, TABLE_NAME_SEPARATOR_COLON },
{ FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_COLON },
{ STATE_DB, TABLE_NAME_SEPARATOR_VBAR },
{ GB_ASIC_DB, TABLE_NAME_SEPARATOR_VBAR },
{ GB_COUNTERS_DB, TABLE_NAME_SEPARATOR_VBAR },
{ GB_FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_VBAR }
};

Table::Table(const DBConnector *db, const string &tableName)
Expand Down

0 comments on commit 292b08a

Please sign in to comment.