Skip to content

Commit

Permalink
Remove redundant and problematic code to skip "pool" field in buffer …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
stephenxs authored Mar 30, 2022
1 parent a55343c commit 6241bbf
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions orchagent/bufferorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,6 @@ task_process_status BufferOrch::processBufferProfile(KeyOpFieldsValuesTuple &tup
sai_attribute_t attr;
if (field == buffer_pool_field_name)
{
if (SAI_NULL_OBJECT_ID != sai_object)
{
// We should skip the profile's pool name because it's create only when setting a profile's attribute.
SWSS_LOG_INFO("Skip setting buffer profile's pool %s for profile %s", value.c_str(), object_name.c_str());
continue;
}

sai_object_id_t sai_pool;
ref_resolve_status resolve_result = resolveFieldRefValue(m_buffer_type_maps, buffer_pool_field_name,
buffer_to_ref_table_map.at(buffer_pool_field_name),
Expand Down

0 comments on commit 6241bbf

Please sign in to comment.