Skip to content

Commit

Permalink
Add comment to explain a logic in handleDelSingleBufferObjectOnAdminD…
Browse files Browse the repository at this point in the history
…ownPort

Why no need to check zero profile name

Signed-off-by: Stephen Sun <stephens@nvidia.com>
  • Loading branch information
stephenxs committed Nov 13, 2021
1 parent 077312b commit e963183
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cfgmgr/buffermgrdyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2750,6 +2750,10 @@ void BufferMgrDynamic::handleDelSingleBufferObjectOnAdminDownPort(buffer_directi
SWSS_LOG_INFO("Removing buffer %s item %s, got combined item %s",
objectName.c_str(), key.c_str(), idStr.c_str());
supportedNotConfiguredItems.insert(idStr);
// According to the logic in reclaimReservedBufferForPort,
// only if the m_bufferZeroProfileName is not empty will supported_but_not_configured list be generated.
// Now that adjancentItemsSet, which is a sub set of supported_but_not_configured, is NOT empty,
// m_bufferZeroProfileName must NOT be empty.
updateBufferObjectToDb(keyPrefix + idStr, m_bufferZeroProfileName[direction], true, direction);
}
}
Expand Down

0 comments on commit e963183

Please sign in to comment.