Skip to content

Commit

Permalink
[sairedis] Remove legacy allocateSwitchIndex api
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Sep 20, 2021
1 parent 78f3613 commit 16fff7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
19 changes: 0 additions & 19 deletions lib/VirtualObjectIdManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,25 +175,6 @@ void VirtualObjectIdManager::clear()
m_switchIndexes.clear();
}

uint32_t VirtualObjectIdManager::allocateNewSwitchIndex()
{
SWSS_LOG_ENTER();

for (uint32_t index = 0; index < SAI_REDIS_SWITCH_INDEX_MAX; ++index)
{
if (m_switchIndexes.find(index) != m_switchIndexes.end())
continue;

m_switchIndexes.insert(index);

SWSS_LOG_NOTICE("allocated new switch index 0x%x", index);

return index;
}

SWSS_LOG_THROW("no more available switch indexes (used count is: %zu)", m_switchIndexes.size());
}

void VirtualObjectIdManager::releaseSwitchIndex(
_In_ uint32_t index)
{
Expand Down
7 changes: 0 additions & 7 deletions lib/VirtualObjectIdManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ namespace sairedis
void releaseSwitchIndex(
_In_ uint32_t index);

/**
* @brief Allocate new switch index.
*
* Will throw if there are no more available switch indexes.
*/
uint32_t allocateNewSwitchIndex();

/**
* @brief Construct object id.
*
Expand Down

0 comments on commit 16fff7f

Please sign in to comment.