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

Add default ECMP/LAG hash offset values for T0 and T1 #18912

Merged
merged 5 commits into from
May 21, 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
6 changes: 6 additions & 0 deletions dockers/docker-orchagent/switch.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
{# set default hash seed to 0 #}
{% set hash_seed = 0 %}
{% set hash_seed_offset = 0 %}
{% set ecmp_hash_offset_value = 0 %}
{% set lag_hash_offset_value = 0 %}
{% if DEVICE_METADATA.localhost.type %}
{% if "ToRRouter" in DEVICE_METADATA.localhost.type or DEVICE_METADATA.localhost.type in ["EPMS", "MgmtTsToR"] %}
{% set hash_seed = 0 %}
{% elif "LeafRouter" in DEVICE_METADATA.localhost.type %}
{% set hash_seed = 10 %}
{% set ecmp_hash_offset_value = 10 %}
{% set lag_hash_offset_value = 10 %}
{% elif "SpineRouter" in DEVICE_METADATA.localhost.type %}
{% set hash_seed = 25 %}
{% endif %}
Expand All @@ -22,6 +26,8 @@
"ecmp_hash_seed": "{{ hash_seed_value }}",
"lag_hash_seed": "{{ hash_seed_value }}",
"fdb_aging_time": "600",
"ecmp_hash_offset": "{{ ecmp_hash_offset_value }}",
"lag_hash_offset": "{{ lag_hash_offset_value }}",
{% if DEVICE_METADATA.localhost.type and "LeafRouter" in DEVICE_METADATA.localhost.type %}
"ordered_ecmp": "true"
{% else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"ecmp_hash_seed": "11",
"lag_hash_seed": "11",
"fdb_aging_time": "600",
"ecmp_hash_offset": "10",
"lag_hash_offset": "10",
"ordered_ecmp": "true"
},
"OP": "SET"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"ecmp_hash_seed": "13",
"lag_hash_seed": "13",
"fdb_aging_time": "600",
"ecmp_hash_offset": "10",
"lag_hash_offset": "10",
"ordered_ecmp": "true"
},
"OP": "SET"
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-config-engine/tests/sample_output/t0-switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"ecmp_hash_seed": "0",
"lag_hash_seed": "0",
"fdb_aging_time": "600",
"ecmp_hash_offset": "0",
"lag_hash_offset": "0",
"ordered_ecmp": "false"
},
"OP": "SET"
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-config-engine/tests/sample_output/t1-switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"ecmp_hash_seed": "10",
"lag_hash_seed": "10",
"fdb_aging_time": "600",
"ecmp_hash_offset": "10",
"lag_hash_offset": "10",
"ordered_ecmp": "true"
},
"OP": "SET"
Expand Down
Loading