From aac71e642bcb53df4a13e340b4610f787ce48c26 Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Thu, 1 Apr 2021 18:06:06 +0800 Subject: [PATCH] Don't update pools when ingress_lossless_pool is created but the initialization hasn't finished yet (#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 --- cfgmgr/buffermgrdyn.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cfgmgr/buffermgrdyn.cpp b/cfgmgr/buffermgrdyn.cpp index fbeb9417ee4d..04fb5b2b9231 100644 --- a/cfgmgr/buffermgrdyn.cpp +++ b/cfgmgr/buffermgrdyn.cpp @@ -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