Skip to content

Commit

Permalink
Merge branch 'master' into dhcp_dos_mitigation_swss
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadalihussnain authored Jan 22, 2025
2 parents 49d88fc + ec2957c commit ef69960
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,8 +1762,16 @@ bool PortsOrch::setPortAdminStatus(Port &port, bool state)

void PortsOrch::setHostTxReady(Port port, const std::string &status)
{
SWSS_LOG_NOTICE("Setting host_tx_ready status = %s, alias = %s, port_id = 0x%" PRIx64, status.c_str(), port.m_alias.c_str(), port.m_port_id);
m_portStateTable.hset(port.m_alias, "host_tx_ready", status);
vector<FieldValueTuple> tuples;
bool exist;

/* If the port is revmoed, don't need to update StateDB*/
exist = m_portStateTable.get(port.m_alias, tuples);
if (exist)
{
SWSS_LOG_NOTICE("Setting host_tx_ready status = %s, alias = %s, port_id = 0x%" PRIx64, status.c_str(), port.m_alias.c_str(), port.m_port_id);
m_portStateTable.hset(port.m_alias, "host_tx_ready", status);
}
}

bool PortsOrch::getPortAdminStatus(sai_object_id_t id, bool &up)
Expand Down

0 comments on commit ef69960

Please sign in to comment.