Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preventing dynamic generation of BUFFER_PROFILE and BUFFER_PG entries in CONFIG_DB #3418

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mramezani95
Copy link
Contributor

@mramezani95 mramezani95 commented Dec 10, 2024

What I did
Prevented buffermgrd from dynamically generating lossless BUFFER_PROFILE and BUFFER_PG entries based on a port's speed and cable length if autoneg is not enabled (i.e., not set to on or 1) 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 contain pg_lossless_* buffer profiles, I selected two ports with different cable lengths and with non-empty pfc_enable fields in the PORT_QOS_MAP table. Then I set autoneg to on for one of them in the PORT table. I verified that after reloading the configuration with sudo config reload -y, BUFFER_PROFILE and BUFFER_PG entries were created in CONFIG_DB and APP_DB only for the port for which autoneg 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 corresponding BUFFER_PG entry if autoneg is not enabled for the port.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants