Skip to content

Commit

Permalink
Revert "Revert "[swss]: Add default ECMP/LAG hash offset values for T…
Browse files Browse the repository at this point in the history
…0 and T1…"

This reverts commit 3bab55c.
  • Loading branch information
yxieca authored Jul 3, 2024
1 parent 0755b0c commit 5f60386
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
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 @@ -21,6 +25,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

0 comments on commit 5f60386

Please sign in to comment.