-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[swss]: Add switch.json.j2 to set the hash seed according to the swit…
…ch type (#1089) Set the ECMP/LAG hash seed to 10 when the switch is a ToR, 20 when the switch is a Leaf, 0 otherwise. Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
- Loading branch information
Shuotian Cheng
authored
Oct 29, 2017
1 parent
2ba2818
commit 1a81715
Showing
4 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{# set default hash seed to 0 #} | ||
{% set hash_seed = 0 %} | ||
{% if DEVICE_METADATA.localhost.type %} | ||
{% if DEVICE_METADATA.localhost.type == "ToRRouter" %} | ||
{% set hash_seed = 10 %} | ||
{% elif DEVICE_METADATA.localhost.type == "LeafRouter" %} | ||
{% set hash_seed = 20 %} | ||
{% endif %} | ||
{% endif %} | ||
[ | ||
{ | ||
"SWITCH_TABLE:switch": { | ||
"ecmp_hash_seed": "{{ hash_seed }}", | ||
"lag_hash_seed": "{{ hash_seed }}" | ||
}, | ||
"OP": "SET" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters