Skip to content

Commit 16fff7f

Browse files
committed
[sairedis] Remove legacy allocateSwitchIndex api
1 parent 78f3613 commit 16fff7f

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

lib/VirtualObjectIdManager.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,6 @@ void VirtualObjectIdManager::clear()
175175
m_switchIndexes.clear();
176176
}
177177

178-
uint32_t VirtualObjectIdManager::allocateNewSwitchIndex()
179-
{
180-
SWSS_LOG_ENTER();
181-
182-
for (uint32_t index = 0; index < SAI_REDIS_SWITCH_INDEX_MAX; ++index)
183-
{
184-
if (m_switchIndexes.find(index) != m_switchIndexes.end())
185-
continue;
186-
187-
m_switchIndexes.insert(index);
188-
189-
SWSS_LOG_NOTICE("allocated new switch index 0x%x", index);
190-
191-
return index;
192-
}
193-
194-
SWSS_LOG_THROW("no more available switch indexes (used count is: %zu)", m_switchIndexes.size());
195-
}
196-
197178
void VirtualObjectIdManager::releaseSwitchIndex(
198179
_In_ uint32_t index)
199180
{

lib/VirtualObjectIdManager.h

-7
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ namespace sairedis
9191
void releaseSwitchIndex(
9292
_In_ uint32_t index);
9393

94-
/**
95-
* @brief Allocate new switch index.
96-
*
97-
* Will throw if there are no more available switch indexes.
98-
*/
99-
uint32_t allocateNewSwitchIndex();
100-
10194
/**
10295
* @brief Construct object id.
10396
*

0 commit comments

Comments
 (0)