Skip to content

Commit 6241bbf

Browse files
authored
Remove redundant and problematic code to skip "pool" field in buffer profile handling (sonic-net#2197)
- What I did Remove redundant and problematic code to skip "pool" field in buffer profile handling - Why I did it When a buffer profile is modified, the snippet of code skipped "pool" field handling without pool's name being parsed, which broke the dependency tracing logic. In a rare scenario, if buffer orchagent receives a notification to remove the pool before removing the profile, it can cause the buffer pool to be removed when it is still referenced. - How I verified it Manually and regression test. Signed-off-by: Stephen Sun <[email protected]>
1 parent a55343c commit 6241bbf

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

orchagent/bufferorch.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -661,13 +661,6 @@ task_process_status BufferOrch::processBufferProfile(KeyOpFieldsValuesTuple &tup
661661
sai_attribute_t attr;
662662
if (field == buffer_pool_field_name)
663663
{
664-
if (SAI_NULL_OBJECT_ID != sai_object)
665-
{
666-
// We should skip the profile's pool name because it's create only when setting a profile's attribute.
667-
SWSS_LOG_INFO("Skip setting buffer profile's pool %s for profile %s", value.c_str(), object_name.c_str());
668-
continue;
669-
}
670-
671664
sai_object_id_t sai_pool;
672665
ref_resolve_status resolve_result = resolveFieldRefValue(m_buffer_type_maps, buffer_pool_field_name,
673666
buffer_to_ref_table_map.at(buffer_pool_field_name),

0 commit comments

Comments
 (0)