Skip to content

Commit

Permalink
[buffer] indicate shared pool by putting a very small shared buffer p…
Browse files Browse the repository at this point in the history
…ool size (sonic-net#3387)

What I did
Put a very small shared buffer pool size when shared pool is detected enabling.

Why I did it
Avoid a timing issue like following:

the buffer pool sizes, xoff have initialized to 0, which means the shared headroom pool is disabled
but the buffer profiles already indicate the shared headroom pool is enabled
later on the buffer pool sizes are updated with xoff being non-zero
In case the orchagent starts handling buffer configuration between 2 and 3, it is inconsistent between buffer pools and profiles, which fails Mellanox SAI sanity check and causes orchagent abort
  • Loading branch information
Junchao-Mellanox authored Dec 3, 2024
1 parent 0929d86 commit d264a8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cfgmgr/buffer_pool_mellanox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ local function fetch_buffer_pool_size_from_appldb(shp_enabled)
-- In case the orchagent starts handling buffer configuration between 2 and 3,
-- It is inconsistent between buffer pools and profiles, which fails Mellanox SAI sanity check
-- To avoid it, it indicates the shared headroom pool is enabled by setting a very small buffer pool and shared headroom pool sizes
table.insert(result, buffer_pools[i] .. ':2048:1024')
if size == "0" then
table.insert(result, buffer_pools[i] .. ':2048:1024')
else
table.insert(result, buffer_pools[i] .. ":" .. size .. ':1024')
end
else
table.insert(result, buffer_pools[i] .. ':' .. size)
end
Expand Down

0 comments on commit d264a8a

Please sign in to comment.