Skip to content

[gcu]: Add marvell-teralynx platform to gcu field validator #3881

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rminnikanti
Copy link

@rminnikanti rminnikanti commented May 13, 2025

Fixes #3883

What I did

Enable BUFFER_PROFILE replace operation on dynamic_th field and
PFC_WD field operations on marvell-teralynx platform starting 20241100 Sonic version

How I did it

Added marvell-teralynx platform name to gcu_field_operation_validators.conf.json.

How to verify it

cat buffer_profile.json
[
  {
     "op": "replace",
     "path": "/BUFFER_PROFILE/pg_lossless_50000_5m_profile/dynamic_th",
     "value": "2"
  }
]

Verify above configuration on marvell-teralynx platform using below command:

config apply-patch buffer_profile.json
Patch application starting.
Patch: [{"op": "replace", "path": "/BUFFER_PROFILE/pg_lossless_50000_5m_profile/dynamic_th", "value": "2"}, {"op": "replace", "path": "/BUFFER_PROFILE/pg_lossless_50000_40m_profile/dynamic_th", "value": "2"}]
localhost getting current config db.
localhost: simulating the target full config after applying the patch.
localhost: validating all JsonPatch operations are permitted on the specified fields
Patch Applier: localhost: validating target config does not have empty tables, since they do not show up in ConfigDb.
Patch Applier: localhost: sorting patch updates.
Patch Applier: The localhost patch was converted into 2 changes:
Patch Applier: localhost: applying 2 changes in order:
Patch Applier:   * [{"op": "replace", "path": "/BUFFER_PROFILE/pg_lossless_50000_5m_profile/dynamic_th", "value": "2"}]
Patch Applier: localhost: verifying patch updates are reflected on ConfigDB.
Patch Applier: localhost patch application completed.
Patch applied successfully.
cat pfcwd.json
[
  {
     "op": "add",
     "path": "/PFC_WD/GLOBAL/POLL_INTERVAL",
     "value": "390"
 }
]
config apply-patch pfcwd.json
Patch Applier: localhost: Patch application starting.
Patch Applier: localhost: Patch: [{"op": "add", "path": "/PFC_WD/GLOBAL/POLL_INTERVAL", "value": "390"}]
Patch Applier: localhost getting current config db.
Patch Applier: localhost: simulating the target full config after applying the patch.
Patch Applier: localhost: validating all JsonPatch operations are permitted on the specified fields
Patch Applier: localhost: validating target config does not have empty tables,
                            since they do not show up in ConfigDb.
Patch Applier: localhost: sorting patch updates.
Patch Applier: The localhost patch was converted into 1 change:
Patch Applier: localhost: applying 1 change in order:
Patch Applier:   * [{"op": "replace", "path": "/PFC_WD/GLOBAL/POLL_INTERVAL", "value": "390"}]
Patch Applier: localhost: verifying patch updates are reflected on ConfigDB.
Patch Applier: localhost patch application completed.
Patch applied successfully.

Related PTF test cases:

generic_config_updater/test_mmu_dynamic_threshold_config_update.py::test_dynamic_th_config_updates
generic_config_updater/test_pfcwd_interval.py::test_pfcwd_interval_config_updates

Log:
sonic_mgmt_test_success_log.txt

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Ravi Minnikanti [email protected]

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Enable BUFFER_PROFILE replace operation on dynamic_th field
and PFC_WD field operations on marvell-teralynx platform
starting 20241100 Sonic version

Signed-off-by: Ravi Minnikanti <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rminnikanti rminnikanti marked this pull request as ready for review May 16, 2025 01:38
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.

[GCU]: config apply-patch for BUFFER_PROFILE and PFCWD fails on marvell-teralynx platform
2 participants