1a81715275
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>
19 lines
460 B
Django/Jinja
19 lines
460 B
Django/Jinja
{# 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"
|
|
}
|
|
]
|