Skip to content

Support new field "supporting_bulk_counter_groups" in DEVICE_METADATA|localhost for Mellanox-SN5600-V256 #20548

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

Merged
merged 5 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
QUEUE_WATERMARK_STAT_COUNTER,PG_WATERMARK_STAT_COUNTER,PFC_WD
4 changes: 4 additions & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ start() {
if [ -f "$CREATE_ONLY_CONFIG_DB_BUFFERS_JSON" ]; then
$SONIC_DB_CLI CONFIG_DB HSET 'DEVICE_METADATA|localhost' create_only_config_db_buffers true
fi
SUPPORTING_BULK_COUNTER_GROUPS="$HWSKU_FOLDER/supporting_bulk_counter_groups"
if [ -f "$SUPPORTING_BULK_COUNTER_GROUPS" ]; then
$SONIC_DB_CLI CONFIG_DB HSET 'DEVICE_METADATA|localhost' supporting_bulk_counter_groups@ $(cat $SUPPORTING_BULK_COUNTER_GROUPS)
fi
fi
{%- endif %}

Expand Down
3 changes: 3 additions & 0 deletions files/build_templates/swss_vars.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"mac": "{{ DEVICE_METADATA.localhost.mac }}",
"resource_type": "{{ DEVICE_METADATA.localhost.resource_type }}",
"synchronous_mode": {% if DEVICE_METADATA.localhost.synchronous_mode == "disable" %}"disable"{% else %}"enable"{% endif %},
{%if DEVICE_METADATA.localhost.supporting_bulk_counter_groups is defined and DEVICE_METADATA.localhost.supporting_bulk_counter_groups != '' -%}
"supporting_bulk_counter_groups": "{{ DEVICE_METADATA.localhost.supporting_bulk_counter_groups|join(',') }}",
{% endif -%}
"dual_tor": {% if DEVICE_METADATA.localhost.type == "ToRRouter" and DEVICE_METADATA.localhost.subtype == "DualToR" %}"enable"{% else %}"disable"{% endif %},
"dscp_remapping": {% if SYSTEM_DEFAULTS is defined and SYSTEM_DEFAULTS.tunnel_qos_remap is defined and SYSTEM_DEFAULTS.tunnel_qos_remap.status == "enabled" %}"enable"{% else %}"disable"{% endif %}
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@
"desc": "Verifying invalid create_only_config_db_buffers value",
"eStrKey": "InvalidValue"
},
"DEVICE_METADATA_VALID_SUPPORTING_BULK_COUNTER_GROUPS": {
"desc": "Verifying the supporting_bulk_counter_groups value"
},
"DEVICE_METADATA_VALID_BGP_ROUTER_ID": {
"desc": "Verifying bgp_router_id configuration."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,15 @@
}
}
},
"DEVICE_METADATA_VALID_SUPPORTING_BULK_COUNTER_GROUPS": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"supporting_bulk_counter_groups": ["QUEUE_WATERMARK_STAT_COUNTER","PG_WATERMARK_STAT_COUNTER"]
}
}
}
},
"DEVICE_METADATA_VALID_BGP_ROUTER_ID": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ module sonic-device_metadata {
created, regardless of the CONFIG_DB buffers configuration.";
}

leaf-list supporting_bulk_counter_groups {
type string;
description "This field contains a list of counter groups that support bulk operation.";
}

leaf bgp_router_id {
type inet:ipv4-address;
description "BGP Router identifier";
Expand Down
Loading