Skip to content

Commit e477db4

Browse files
Minor bug fix
1 parent 567de6b commit e477db4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

orchagent/portsorch.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3812,9 +3812,9 @@ bool PortsOrch::initPort(const PortConfig &port)
38123812
}
38133813
if (flex_counters_orch->getPortAttrCountersState())
38143814
{
3815-
if (p.m_type == Port::Type::PHY && supportsPortAttr(p.m_port_id, p.m_alias.c_str()))
3815+
if (!m_supported_phy_attrs.empty())
38163816
{
3817-
if (!m_supported_phy_attrs.empty())
3817+
if (p.m_type == Port::Type::PHY && supportsPortAttr(p.m_port_id, p.m_alias.c_str()))
38183818
{
38193819
auto port_attr_stats = generateCounterStats(m_supported_phy_attrs, sai_serialize_port_attr);
38203820
port_attr_manager.setCounterIdList(p.m_port_id,
@@ -3906,9 +3906,9 @@ void PortsOrch::deInitPort(string alias, sai_object_id_t port_id)
39063906
{
39073907
wred_port_stat_manager.clearCounterIdList(p.m_port_id);
39083908
}
3909-
if (p.m_type == Port::Type::PHY && supportsPortAttr(p.m_port_id, p.m_alias.c_str()))
3909+
if (!m_supported_phy_attrs.empty())
39103910
{
3911-
if (!m_supported_phy_attrs.empty())
3911+
if (p.m_type == Port::Type::PHY && supportsPortAttr(p.m_port_id, p.m_alias.c_str()))
39123912
{
39133913
port_attr_manager.clearCounterIdList(p.m_port_id);
39143914
}

0 commit comments

Comments
 (0)