From 824c83399b54402e4f39f91aa52983ee8f142f4e Mon Sep 17 00:00:00 2001 From: vedganes Date: Thu, 10 Sep 2020 01:41:25 -0400 Subject: [PATCH 01/10] [voq] Redis instance for global app db Signed-off-by: vedganes --- common/database_config.json | 10 ++++++++++ common/schema.h | 1 + 2 files changed, 11 insertions(+) diff --git a/common/database_config.json b/common/database_config.json index b65d0e794..b6064dd3f 100644 --- a/common/database_config.json +++ b/common/database_config.json @@ -4,6 +4,11 @@ "hostname" : "127.0.0.1", "port" : 6379, "unix_socket_path" : "/var/run/redis/redis.sock" + }, + "redis-global_db":{ + "hostname" : "240.127.1.1", + "port" : 6380, + "unix_socket_path" : "/var/run/redis/redis-global_db.sock" } }, "DATABASES" : { @@ -66,6 +71,11 @@ "id" : 10, "separator": "|", "instance" : "redis" + }, + "GLOBAL_APP_DB" : { + "id" : 11, + "separator": ":", + "instance" : "redis-global_db" } }, "VERSION" : "1.0" diff --git a/common/schema.h b/common/schema.h index bdfcb2257..86f16bd12 100644 --- a/common/schema.h +++ b/common/schema.h @@ -19,6 +19,7 @@ namespace swss { #define GB_ASIC_DB 8 #define GB_COUNTERS_DB 9 #define GB_FLEX_COUNTER_DB 10 +#define GLOBAL_APP_DB 11 /***** APPLICATION DATABASE *****/ From 8d64d10169ac2e5fe246d2462d51a9500b31868d Mon Sep 17 00:00:00 2001 From: vedganes Date: Thu, 10 Sep 2020 02:36:33 -0400 Subject: [PATCH 02/10] [voq] System port init and orchestration Signed-off-by: vedganes --- common/schema.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/schema.h b/common/schema.h index 86f16bd12..5f582b30f 100644 --- a/common/schema.h +++ b/common/schema.h @@ -72,6 +72,8 @@ namespace swss { #define APP_STP_FASTAGEING_FLUSH_TABLE_NAME "STP_FASTAGEING_FLUSH_TABLE" #define APP_STP_BPDU_GUARD_TABLE_NAME "STP_BPDU_GUARD_TABLE" +#define APP_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT_TABLE" + /***** TO BE REMOVED *****/ #define APP_TC_TO_QUEUE_MAP_TABLE_NAME "TC_TO_QUEUE_MAP_TABLE" @@ -268,6 +270,8 @@ namespace swss { #define CFG_FG_NHG_PREFIX "FG_NHG_PREFIX" #define CFG_FG_NHG_MEMBER "FG_NHG_MEMBER" +#define CFG_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT" + /***** STATE DATABASE *****/ #define STATE_SWITCH_CAPABILITY_TABLE_NAME "SWITCH_CAPABILITY_TABLE" From a3ed30f5f66aa53b6463edeaa309c3c48254b691 Mon Sep 17 00:00:00 2001 From: vedganes Date: Thu, 10 Sep 2020 09:09:06 -0400 Subject: [PATCH 03/10] [voq] Router interface for system ports, global app db sync Signed-off-by: vedganes --- common/schema.h | 2 ++ common/table.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/schema.h b/common/schema.h index 5f582b30f..b1cb2149d 100644 --- a/common/schema.h +++ b/common/schema.h @@ -272,6 +272,8 @@ namespace swss { #define CFG_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT" +#define VOQ_SYSTEM_INTERFACE_TABLE_NAME "SYSTEM_INTERFACE" + /***** STATE DATABASE *****/ #define STATE_SWITCH_CAPABILITY_TABLE_NAME "SWITCH_CAPABILITY_TABLE" diff --git a/common/table.cpp b/common/table.cpp index 7f4b11b7e..a5d16165d 100644 --- a/common/table.cpp +++ b/common/table.cpp @@ -29,7 +29,8 @@ const TableNameSeparatorMap TableBase::tableNameSeparatorMap = { { 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 } + { GB_FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_VBAR }, + { GLOBAL_APP_DB, TABLE_NAME_SEPARATOR_COLON } }; Table::Table(const DBConnector *db, const string &tableName) From 5166f07aa40a52fefb32947fb464af9e0ea8fca7 Mon Sep 17 00:00:00 2001 From: vedganes Date: Thu, 10 Sep 2020 10:11:20 -0400 Subject: [PATCH 04/10] [voq] Inband interface config Signed-off-by: vedganes --- common/schema.h | 1 + 1 file changed, 1 insertion(+) diff --git a/common/schema.h b/common/schema.h index b1cb2149d..b73734322 100644 --- a/common/schema.h +++ b/common/schema.h @@ -271,6 +271,7 @@ namespace swss { #define CFG_FG_NHG_MEMBER "FG_NHG_MEMBER" #define CFG_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT" +#define CFG_VOQ_INBAND_INTERFACE_TABLE_NAME "VOQ_INBAND_INTERFACE" #define VOQ_SYSTEM_INTERFACE_TABLE_NAME "SYSTEM_INTERFACE" From 9ef19bab4c322102608ea02deb76d6f4e32e4b4b Mon Sep 17 00:00:00 2001 From: vedganes Date: Thu, 10 Sep 2020 10:48:00 -0400 Subject: [PATCH 05/10] [voq] System port neighbors Signed-off-by: vedganes --- common/schema.h | 1 + 1 file changed, 1 insertion(+) diff --git a/common/schema.h b/common/schema.h index b73734322..acbeab0b5 100644 --- a/common/schema.h +++ b/common/schema.h @@ -274,6 +274,7 @@ namespace swss { #define CFG_VOQ_INBAND_INTERFACE_TABLE_NAME "VOQ_INBAND_INTERFACE" #define VOQ_SYSTEM_INTERFACE_TABLE_NAME "SYSTEM_INTERFACE" +#define VOQ_SYSTEM_NEIGH_TABLE_NAME "SYSTEM_NEIGH" /***** STATE DATABASE *****/ From 6b61ef54218f59f92be5c888020e2b3ff1292302 Mon Sep 17 00:00:00 2001 From: vedganes Date: Tue, 29 Sep 2020 00:59:04 -0400 Subject: [PATCH 06/10] [swsscommon] Review comments fixes Signed-off-by: vedganes --- common/database_config.json | 14 +++++++------- common/schema.h | 9 ++++++--- common/table.cpp | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/common/database_config.json b/common/database_config.json index b6064dd3f..6c3018e4f 100644 --- a/common/database_config.json +++ b/common/database_config.json @@ -5,10 +5,10 @@ "port" : 6379, "unix_socket_path" : "/var/run/redis/redis.sock" }, - "redis-global_db":{ - "hostname" : "240.127.1.1", + "redis_chassis":{ + "hostname" : "redis_chassis.server" "port" : 6380, - "unix_socket_path" : "/var/run/redis/redis-global_db.sock" + "unix_socket_path" : "/var/run/redis/redis_chassis.sock" } }, "DATABASES" : { @@ -72,10 +72,10 @@ "separator": "|", "instance" : "redis" }, - "GLOBAL_APP_DB" : { - "id" : 11, - "separator": ":", - "instance" : "redis-global_db" + "CHASSIS_APP_DB" : { + "id" : 8, + "separator": "|", + "instance" : "redis_chassis" } }, "VERSION" : "1.0" diff --git a/common/schema.h b/common/schema.h index acbeab0b5..aa9222889 100644 --- a/common/schema.h +++ b/common/schema.h @@ -19,7 +19,10 @@ namespace swss { #define GB_ASIC_DB 8 #define GB_COUNTERS_DB 9 #define GB_FLEX_COUNTER_DB 10 -#define GLOBAL_APP_DB 11 + +//For chassis app db in supervisor/control card redis in chassis systems. +//This DB ID is not to be used in local redis. +#define CHASSIS_APP_DB 8 /***** APPLICATION DATABASE *****/ @@ -273,8 +276,8 @@ namespace swss { #define CFG_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT" #define CFG_VOQ_INBAND_INTERFACE_TABLE_NAME "VOQ_INBAND_INTERFACE" -#define VOQ_SYSTEM_INTERFACE_TABLE_NAME "SYSTEM_INTERFACE" -#define VOQ_SYSTEM_NEIGH_TABLE_NAME "SYSTEM_NEIGH" +#define CHASSIS_APP_SYSTEM_INTERFACE_TABLE_NAME "SYSTEM_INTERFACE" +#define CHASSIS_APP_SYSTEM_NEIGH_TABLE_NAME "SYSTEM_NEIGH" /***** STATE DATABASE *****/ diff --git a/common/table.cpp b/common/table.cpp index a5d16165d..91e2b670c 100644 --- a/common/table.cpp +++ b/common/table.cpp @@ -30,7 +30,7 @@ const TableNameSeparatorMap TableBase::tableNameSeparatorMap = { { GB_ASIC_DB, TABLE_NAME_SEPARATOR_VBAR }, { GB_COUNTERS_DB, TABLE_NAME_SEPARATOR_VBAR }, { GB_FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_VBAR }, - { GLOBAL_APP_DB, TABLE_NAME_SEPARATOR_COLON } + { CHASSIS_APP_DB, TABLE_NAME_SEPARATOR_VBAR } }; Table::Table(const DBConnector *db, const string &tableName) From b21d9984ed671667a6c39e0825380f0a17783e97 Mon Sep 17 00:00:00 2001 From: vedganes Date: Thu, 1 Oct 2020 10:13:29 -0400 Subject: [PATCH 07/10] [swsscommon]Code review comments fix 2. Signed-off-by: vedganes State table for system neigh is added. This is to set the state of system nigh SAI programming. This state is signgl to nbrmgr for kernel programming of the system neighs for which SAI is programmed. --- common/schema.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/schema.h b/common/schema.h index aa9222889..71ba56e7a 100644 --- a/common/schema.h +++ b/common/schema.h @@ -307,6 +307,8 @@ namespace swss { #define STATE_COPP_GROUP_TABLE_NAME "COPP_GROUP_TABLE" #define STATE_COPP_TRAP_TABLE_NAME "COPP_TRAP_TABLE" #define STATE_FG_ROUTE_TABLE_NAME "FG_ROUTE_TABLE" + +#define STATE_SYSTEM_NEIGH_TABLE_NAME "SYSTEM_NEIGH_TABLE" /***** MISC *****/ #define IPV4_NAME "IPv4" From 433235cd33a034c1e131699d1c3742167e3cc0f9 Mon Sep 17 00:00:00 2001 From: vganesan-nokia <67648637+vganesan-nokia@users.noreply.github.com> Date: Thu, 1 Oct 2020 11:36:59 -0400 Subject: [PATCH 08/10] Update database_config.json --- common/database_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/database_config.json b/common/database_config.json index 9a1534b10..b1aa9e64d 100644 --- a/common/database_config.json +++ b/common/database_config.json @@ -81,7 +81,7 @@ "id" : 8, "separator": "|", "instance" : "redis_chassis" - } + } }, "VERSION" : "1.0" } From bd5530837e259f9d01369eb54ef22d661653c3c3 Mon Sep 17 00:00:00 2001 From: vedganes Date: Sun, 11 Oct 2020 21:03:36 -0400 Subject: [PATCH 09/10] [swsscommon] Voq code review comments fix 3 Signed-off-by: vedganes --- common/database_config.json | 2 +- common/schema.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/database_config.json b/common/database_config.json index b1aa9e64d..9cd981873 100644 --- a/common/database_config.json +++ b/common/database_config.json @@ -78,7 +78,7 @@ "instance" : "redis" }, "CHASSIS_APP_DB" : { - "id" : 8, + "id" : 12, "separator": "|", "instance" : "redis_chassis" } diff --git a/common/schema.h b/common/schema.h index e42f4d9a6..6573e8d76 100644 --- a/common/schema.h +++ b/common/schema.h @@ -20,10 +20,7 @@ namespace swss { #define GB_ASIC_DB 9 #define GB_COUNTERS_DB 10 #define GB_FLEX_COUNTER_DB 11 - -//For chassis app db in supervisor/control card redis in chassis systems. -//This DB ID is not to be used in local redis. -#define CHASSIS_APP_DB 8 +#define CHASSIS_APP_DB 12 /***** APPLICATION DATABASE *****/ From bff8f389999c73ef5bf8e727f6420bc9b12b9aca Mon Sep 17 00:00:00 2001 From: vganesan-nokia <67648637+vganesan-nokia@users.noreply.github.com> Date: Thu, 22 Oct 2020 00:29:01 -0400 Subject: [PATCH 10/10] Update database_config.json Fix for build failure due to pytest failure. --- common/database_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/database_config.json b/common/database_config.json index 9cd981873..bce487df7 100644 --- a/common/database_config.json +++ b/common/database_config.json @@ -6,7 +6,7 @@ "unix_socket_path" : "/var/run/redis/redis.sock" }, "redis_chassis":{ - "hostname" : "redis_chassis.server" + "hostname" : "redis_chassis.server", "port" : 6380, "unix_socket_path" : "/var/run/redis/redis_chassis.sock" }