Preventing dynamic generation of BUFFER_PROFILE and BUFFER_PG entries in CONFIG_DB #3418
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Prevented buffermgrd from dynamically generating lossless
BUFFER_PROFILE
andBUFFER_PG
entries based on a port's speed and cable length ifautoneg
is not enabled (i.e., not set toon
or1
) for that port.Why I did it
The automatic generation of these entries can create an invalid config diff between the golden config and the running config.
How I verified it
Starting with a
config_db.json
file that did not containpg_lossless_*
buffer profiles, I selected two ports with different cable lengths and with non-emptypfc_enable
fields in thePORT_QOS_MAP
table. Then I setautoneg
toon
for one of them in thePORT
table. I verified that after reloading the configuration withsudo config reload -y
,BUFFER_PROFILE
andBUFFER_PG
entries were created inCONFIG_DB
andAPP_DB
only for the port for whichautoneg
was enabled. Also, I verified that warm-reboot from 202305 to the new image works without any issues.These tests were performed on a T0 switch with Mellanox ASIC.
Details if related
The dynamically-generated buffer profiles have the format
pg_lossless_<port_speed>_<cable_length>_profile
. This PR prevents their creation and also the creation of the correspondingBUFFER_PG
entry ifautoneg
is not enabled for the port.