From 4aaeec91fcd635a33902965c529e779a1accd9d9 Mon Sep 17 00:00:00 2001 From: Eran Dahan Date: Wed, 24 Aug 2022 21:05:09 +0300 Subject: [PATCH] added support for Xsight platform (#2426) * Added support for Xsight platform Signed-off-by: Borys Barkauskas --- orchagent/aclorch.cpp | 2 ++ orchagent/orch.h | 1 + orchagent/saihelper.cpp | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 331a11dbda07..ff7d911063ce 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -2885,6 +2885,7 @@ void AclOrch::init(vector& connectors, PortsOrch *portOrch, Mirr platform == MRVL_PLATFORM_SUBSTRING || platform == INVM_PLATFORM_SUBSTRING || platform == NPS_PLATFORM_SUBSTRING || + platform == XS_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING) { m_mirrorTableCapabilities = @@ -2913,6 +2914,7 @@ void AclOrch::init(vector& connectors, PortsOrch *portOrch, Mirr if (platform == MLNX_PLATFORM_SUBSTRING || platform == CISCO_8000_PLATFORM_SUBSTRING || platform == MRVL_PLATFORM_SUBSTRING || + platform == XS_PLATFORM_SUBSTRING || (platform == BRCM_PLATFORM_SUBSTRING && sub_platform == BRCM_DNX_PLATFORM_SUBSTRING)) { m_isCombinedMirrorV6Table = false; diff --git a/orchagent/orch.h b/orchagent/orch.h index a808fef32684..7e803bbd93d6 100644 --- a/orchagent/orch.h +++ b/orchagent/orch.h @@ -40,6 +40,7 @@ const char state_db_key_delimiter = '|'; #define NPS_PLATFORM_SUBSTRING "nephos" #define MRVL_PLATFORM_SUBSTRING "marvell" #define CISCO_8000_PLATFORM_SUBSTRING "cisco-8000" +#define XS_PLATFORM_SUBSTRING "xsight" #define CONFIGDB_KEY_SEPARATOR "|" #define DEFAULT_KEY_SEPARATOR ":" diff --git a/orchagent/saihelper.cpp b/orchagent/saihelper.cpp index 6ab857067668..b216e0dccdea 100644 --- a/orchagent/saihelper.cpp +++ b/orchagent/saihelper.cpp @@ -307,7 +307,7 @@ void initSaiRedis(const string &record_location, const std::string &record_filen SWSS_LOG_NOTICE("Enable redis pipeline"); char *platform = getenv("platform"); - if (platform && strstr(platform, MLNX_PLATFORM_SUBSTRING)) + if (platform && (strstr(platform, MLNX_PLATFORM_SUBSTRING) || strstr(platform, XS_PLATFORM_SUBSTRING))) { /* We set this long timeout in order for Orchagent to wait enough time for * response from syncd. It is needed since in init, systemd syncd startup @@ -337,7 +337,7 @@ void initSaiRedis(const string &record_location, const std::string &record_filen } SWSS_LOG_NOTICE("Notify syncd INIT_VIEW"); - if (platform && strstr(platform, MLNX_PLATFORM_SUBSTRING)) + if (platform && (strstr(platform, MLNX_PLATFORM_SUBSTRING) || strstr(platform, XS_PLATFORM_SUBSTRING))) { /* Set timeout back to the default value */ attr.id = SAI_REDIS_SWITCH_ATTR_SYNC_OPERATION_RESPONSE_TIMEOUT;