Skip to content

Commit

Permalink
Don't update pools when ingress_lossless_pool is created but the init…
Browse files Browse the repository at this point in the history
…ialization hasn't finished yet (sonic-net#1685)

Bug:
The buffer pools will be created after a short timer and then won't be
updated until the initialization has finished. This is to avoid
repeatedly updating buffer pools after BUFFER_PG and BUFFER_QUEUE have
been created for each port.
However, when the ingress_lossless_pool is created it will trigger the
buffer pools to be updated for shared headroom pool. If this happens
during intialization, it causes all the buffer pools created after
ingress_lossless_pool won't be created until the initialization has been
done.
Fix:
Don't trigger updating buffer pools when creating ingress_lossless_pool
during intialization.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
  • Loading branch information
stephenxs authored Apr 1, 2021
1 parent ae5f051 commit aac71e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cfgmgr/buffermgrdyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,10 @@ void BufferMgrDynamic::refreshSharedHeadroomPool(bool enable_state_updated_by_ra
updateBufferPoolToDb(INGRESS_LOSSLESS_PG_POOL_NAME, ingressLosslessPool);
}

checkSharedBufferPoolSize();
if (m_portInitDone)
{
checkSharedBufferPoolSize();
}
}

// Main flows
Expand Down

0 comments on commit aac71e6

Please sign in to comment.