Skip to content

Commit

Permalink
Enable/Disable Order ECMP feature. (#9651)
Browse files Browse the repository at this point in the history
Updated Jinja2 Template in switch.json.j2 for enabling/disabling Order ECMP feature based on device role.
Changes as per design: sonic-net/SONiC#896
  • Loading branch information
abdosi authored Jan 7, 2022
1 parent bdfe89c commit 6c50732
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
7 changes: 6 additions & 1 deletion dockers/docker-orchagent/switch.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
"SWITCH_TABLE:switch": {
"ecmp_hash_seed": "{{ hash_seed_value }}",
"lag_hash_seed": "{{ hash_seed_value }}",
"fdb_aging_time": "600"
"fdb_aging_time": "600",
{% if DEVICE_METADATA.localhost.type and "LeafRouter" in DEVICE_METADATA.localhost.type %}
"ordered_ecmp": "true"
{% else %}
"ordered_ecmp": "false"
{% endif %}
},
"OP": "SET"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"SWITCH_TABLE:switch": {
"ecmp_hash_seed": "11",
"lag_hash_seed": "11",
"fdb_aging_time": "600"
"fdb_aging_time": "600",
"ordered_ecmp": "true"
},
"OP": "SET"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"SWITCH_TABLE:switch": {
"ecmp_hash_seed": "13",
"lag_hash_seed": "13",
"fdb_aging_time": "600"
"fdb_aging_time": "600",
"ordered_ecmp": "true"
},
"OP": "SET"
}
Expand Down
3 changes: 2 additions & 1 deletion src/sonic-config-engine/tests/sample_output/t0-switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"SWITCH_TABLE:switch": {
"ecmp_hash_seed": "0",
"lag_hash_seed": "0",
"fdb_aging_time": "600"
"fdb_aging_time": "600",
"ordered_ecmp": "false"
},
"OP": "SET"
}
Expand Down
3 changes: 2 additions & 1 deletion src/sonic-config-engine/tests/sample_output/t1-switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"SWITCH_TABLE:switch": {
"ecmp_hash_seed": "10",
"lag_hash_seed": "10",
"fdb_aging_time": "600"
"fdb_aging_time": "600",
"ordered_ecmp": "true"
},
"OP": "SET"
}
Expand Down

0 comments on commit 6c50732

Please sign in to comment.