diff --git a/orchagent/copporch.cpp b/orchagent/copporch.cpp index fbe3f1080a4..516664fe05c 100644 --- a/orchagent/copporch.cpp +++ b/orchagent/copporch.cpp @@ -145,8 +145,9 @@ void CoppOrch::initDefaultTrapIds() trap_id_attrs.push_back(attr); /* 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)) + if (!platform || (!strstr(platform, MLNX_PLATFORM_SUBSTRING) && (!strstr(platform, MRVL_PLATFORM_SUBSTRING)))) { attr.id = SAI_HOSTIF_TRAP_ATTR_TRAP_PRIORITY; attr.value.u32 = 0; @@ -495,8 +496,9 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer) else if (fvField(*i) == copp_trap_priority_field) { /* 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)) + 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 1ea75b19d35..b00716e1747 100644 --- a/orchagent/orch.h +++ b/orchagent/orch.h @@ -35,6 +35,7 @@ const char state_db_key_delimiter = '|'; #define BFN_PLATFORM_SUBSTRING "barefoot" #define VS_PLATFORM_SUBSTRING "vs" #define NPS_PLATFORM_SUBSTRING "nephos" +#define MRVL_PLATFORM_SUBSTRING "marvell" #define CONFIGDB_KEY_SEPARATOR "|" #define DEFAULT_KEY_SEPARATOR ":"