From 0b331f0db4b842ff9b857e462e52b3a17ab65802 Mon Sep 17 00:00:00 2001 From: krismarvell <108510436+krismarvell@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:55:47 +0530 Subject: [PATCH] platform/innovium renaming to platform/marvell-teralynx (#3252) What I did asic type checks for innovium platforms renamed innovium to marvell-teralynx Why I did it asictype is being renamed in sonic-buildimage repo and hence respective platform checks needs changes in swss --- orchagent/Makefile.am | 2 +- orchagent/aclorch.cpp | 4 ++-- orchagent/copporch.cpp | 4 ++-- orchagent/orch.h | 2 +- orchagent/orchdaemon.cpp | 8 +++++--- ...etect_innovium.lua => pfc_detect_marvell_teralynx.lua} | 0 6 files changed, 11 insertions(+), 9 deletions(-) rename orchagent/{pfc_detect_innovium.lua => pfc_detect_marvell_teralynx.lua} (100%) diff --git a/orchagent/Makefile.am b/orchagent/Makefile.am index 5224751f73..ae83c16d8f 100644 --- a/orchagent/Makefile.am +++ b/orchagent/Makefile.am @@ -17,7 +17,7 @@ swssdir = $(datadir)/swss dist_swss_DATA = \ eliminate_events.lua \ rif_rates.lua \ - pfc_detect_innovium.lua \ + pfc_detect_marvell_teralynx.lua \ pfc_detect_mellanox.lua \ pfc_detect_broadcom.lua \ pfc_detect_marvell.lua \ diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index d3536719fb..ef9391ae42 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -3128,7 +3128,7 @@ void AclOrch::init(vector& connectors, PortsOrch *portOrch, Mirr platform == MLNX_PLATFORM_SUBSTRING || platform == BFN_PLATFORM_SUBSTRING || platform == MRVL_PLATFORM_SUBSTRING || - platform == INVM_PLATFORM_SUBSTRING || + platform == MRVL_TL_PLATFORM_SUBSTRING || platform == NPS_PLATFORM_SUBSTRING || platform == XS_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING) @@ -3149,7 +3149,7 @@ void AclOrch::init(vector& connectors, PortsOrch *portOrch, Mirr } if ( platform == MRVL_PLATFORM_SUBSTRING || - platform == INVM_PLATFORM_SUBSTRING || + platform == MRVL_TL_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING) { m_L3V4V6Capability = diff --git a/orchagent/copporch.cpp b/orchagent/copporch.cpp index 749a8aae7e..634a8a8ed6 100644 --- a/orchagent/copporch.cpp +++ b/orchagent/copporch.cpp @@ -1014,8 +1014,8 @@ bool CoppOrch::getAttribsFromTrapGroup (vector &fv_tuple, { /* Mellanox platform doesn't support trap priority setting */ /* Marvell platform doesn't support trap priority. */ - char *platform = getenv("platform"); - if (!platform || (!strstr(platform, MLNX_PLATFORM_SUBSTRING) && (!strstr(platform, MRVL_PLATFORM_SUBSTRING)))) + char *platform = getenv("platform"); + if (!platform || (!strstr(platform, MLNX_PLATFORM_SUBSTRING) && (!strstr(platform, MRVL_PLATFORM_SUBSTRING)))) { attr.id = SAI_HOSTIF_TRAP_ATTR_TRAP_PRIORITY, attr.value.u32 = (uint32_t)stoul(fvValue(*i)); diff --git a/orchagent/orch.h b/orchagent/orch.h index bdbecf5f5f..5e8939c53f 100644 --- a/orchagent/orch.h +++ b/orchagent/orch.h @@ -34,7 +34,7 @@ const char range_specifier = '-'; const char config_db_key_delimiter = '|'; const char state_db_key_delimiter = '|'; -#define INVM_PLATFORM_SUBSTRING "innovium" +#define MRVL_TL_PLATFORM_SUBSTRING "marvell-teralynx" #define MLNX_PLATFORM_SUBSTRING "mellanox" #define BRCM_PLATFORM_SUBSTRING "broadcom" #define BRCM_DNX_PLATFORM_SUBSTRING "broadcom-dnx" diff --git a/orchagent/orchdaemon.cpp b/orchagent/orchdaemon.cpp index 0d2ab1c200..f6e9428ab6 100644 --- a/orchagent/orchdaemon.cpp +++ b/orchagent/orchdaemon.cpp @@ -590,9 +590,9 @@ bool OrchDaemon::init() queueAttrIds, PFC_WD_POLL_MSECS)); } - else if ((platform == INVM_PLATFORM_SUBSTRING) + else if ((platform == MRVL_TL_PLATFORM_SUBSTRING) + || (platform == MRVL_PLATFORM_SUBSTRING) || (platform == BFN_PLATFORM_SUBSTRING) - || (platform == MRVL_PLATFORM_SUBSTRING) || (platform == NPS_PLATFORM_SUBSTRING)) { @@ -624,7 +624,9 @@ bool OrchDaemon::init() static const vector queueAttrIds; - if ((platform == INVM_PLATFORM_SUBSTRING) || (platform == NPS_PLATFORM_SUBSTRING) || (platform == MRVL_PLATFORM_SUBSTRING)) + if ((platform == MRVL_PLATFORM_SUBSTRING) || + (platform == MRVL_TL_PLATFORM_SUBSTRING) || + (platform == NPS_PLATFORM_SUBSTRING)) { m_orchList.push_back(new PfcWdSwOrch( m_configDb, diff --git a/orchagent/pfc_detect_innovium.lua b/orchagent/pfc_detect_marvell_teralynx.lua similarity index 100% rename from orchagent/pfc_detect_innovium.lua rename to orchagent/pfc_detect_marvell_teralynx.lua