diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index ed8f15bf79b..cbe66cf0f5a 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -186,8 +186,8 @@ bool AclRule::validateAddMatch(string attr_name, string attr_value) } else if(attr_name == MATCH_DSCP) { - value.aclfield.data.u8 = to_uint(attr_value, 0, 63); - value.aclfield.mask.u8 = 0xFF; + value.aclfield.data.u8 = to_uint(attr_value, 0, 0x3F); + value.aclfield.mask.u8 = 0x3F; } else if(attr_name == MATCH_IP_PROTOCOL) { diff --git a/orchagent/mirrororch.cpp b/orchagent/mirrororch.cpp index 3cff0bfd3c1..8547c4b41c7 100644 --- a/orchagent/mirrororch.cpp +++ b/orchagent/mirrororch.cpp @@ -396,25 +396,29 @@ bool MirrorOrch::activateSession(const string& name, MirrorEntry& session) attr.value.s32 = SAI_MIRROR_SESSION_TYPE_ENHANCED_REMOTE; attrs.push_back(attr); - attr.id = SAI_MIRROR_SESSION_ATTR_VLAN_HEADER_VALID; - attr.value.booldata = true; - attrs.push_back(attr); + /* Add the VLAN header when the packet is sent out from a VLAN */ + if (session.neighborInfo.vlanId) + { + attr.id = SAI_MIRROR_SESSION_ATTR_VLAN_HEADER_VALID; + attr.value.booldata = true; + attrs.push_back(attr); - attr.id =SAI_MIRROR_SESSION_ATTR_VLAN_TPID; - attr.value.u16 = ETH_P_8021Q; - attrs.push_back(attr); + attr.id =SAI_MIRROR_SESSION_ATTR_VLAN_TPID; + attr.value.u16 = ETH_P_8021Q; + attrs.push_back(attr); - attr.id =SAI_MIRROR_SESSION_ATTR_VLAN_ID; - attr.value.u16 = session.neighborInfo.vlanId; - attrs.push_back(attr); + attr.id =SAI_MIRROR_SESSION_ATTR_VLAN_ID; + attr.value.u16 = session.neighborInfo.vlanId; + attrs.push_back(attr); - attr.id = SAI_MIRROR_SESSION_ATTR_VLAN_PRI; - attr.value.u8 = MIRROR_SESSION_DEFAULT_VLAN_PRI; - attrs.push_back(attr); + attr.id = SAI_MIRROR_SESSION_ATTR_VLAN_PRI; + attr.value.u8 = MIRROR_SESSION_DEFAULT_VLAN_PRI; + attrs.push_back(attr); - attr.id = SAI_MIRROR_SESSION_ATTR_VLAN_CFI; - attr.value.u8 = MIRROR_SESSION_DEFAULT_VLAN_CFI; - attrs.push_back(attr); + attr.id = SAI_MIRROR_SESSION_ATTR_VLAN_CFI; + attr.value.u8 = MIRROR_SESSION_DEFAULT_VLAN_CFI; + attrs.push_back(attr); + } attr.id = SAI_MIRROR_SESSION_ATTR_ERSPAN_ENCAPSULATION_TYPE; attr.value.s32 = SAI_ERSPAN_ENCAPSULATION_TYPE_MIRROR_L3_GRE_TUNNEL;