Skip to content

Commit

Permalink
Revert "[Dynamic Buffer Calc] Bug fix: Don't create lossless buffer p…
Browse files Browse the repository at this point in the history
…rofile for active ports without speed configured (#1822)"

This reverts commit 237b89c.
  • Loading branch information
neethajohn committed Aug 4, 2021
1 parent 7aca82d commit 46bea2d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cfgmgr/buffermgrdyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,8 @@ task_process_status BufferMgrDynamic::refreshPgsForPort(const string &port, cons
SWSS_LOG_DEBUG("Nothing to do for port %s since no PG configured on it", port.c_str());
}

portInfo.state = PORT_READY;

// Remove the old profile which is probably not referenced anymore.
if (!profilesToBeReleased.empty())
{
Expand Down Expand Up @@ -1215,9 +1217,6 @@ task_process_status BufferMgrDynamic::doUpdateBufferProfileForDynamicTh(buffer_p
SWSS_LOG_DEBUG("Checking PG %s for dynamic profile %s", key.c_str(), profileName.c_str());
portsChecked.insert(portName);

if (port.state != PORT_READY)
continue;

rc = refreshPgsForPort(portName, port.effective_speed, port.cable_length, port.mtu);
if (task_process_status::task_success != rc)
{
Expand Down Expand Up @@ -1453,7 +1452,6 @@ task_process_status BufferMgrDynamic::handlePortStateTable(KeyOpFieldsValuesTupl
{
if (isNonZero(portInfo.cable_length) && portInfo.state != PORT_ADMIN_DOWN)
{
portInfo.state = PORT_READY;
refreshPgsForPort(port, portInfo.effective_speed, portInfo.cable_length, portInfo.mtu);
}
}
Expand Down

0 comments on commit 46bea2d

Please sign in to comment.