Skip to content

Commit

Permalink
[Dual-ToR] add default value for ACL rule for mellanox platform (#13547)
Browse files Browse the repository at this point in the history
- Why I did it
Need to add the possibility to choose between dropping packets (using ACL) on ingress or egress in Dual ToR scenario

- How I did it
Add new attribute "mux_tunnel_ingress_acl" to SYSTEM_DEFAULTS table

- How to verify it
check that new attribute exists in redis:
admin@sonic:~$ redis-cli -n 4
127.0.0.1:6379[4]> HGETALL SYSTEM_DEFAULTS|mux_tunnel_ingress_acl
1."state"
2."false"

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
  • Loading branch information
ayurkiv-nvda authored Feb 22, 2023
1 parent 5a2a959 commit 5ad78ab
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,16 @@
"digits_class": "true",
"special_class": "true"
}
},
"SYSTEM_DEFAULTS" : {
{%- if include_mux == "y" %}
"mux_tunnel_egress_acl": {
{%- if sonic_asic_platform == "mellanox" %}
"status": "enabled"
{% else %}
"status": "disabled"
{% endif %}
}
{% endif %}
}
}
4 changes: 4 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,10 @@
"SYSTEM_DEFAULTS": {
"tunnel_qos_remap": {
"status": "enabled"
},
"mux_tunnel_egress_acl":
{
"status": "enabled"
}
},
"LOSSLESS_TRAFFIC_PATTERN": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{
"name": "tunnel_qos_remap",
"status": "enabled"
},
{
"name": "mux_tunnel_egress_acl",
"status": "enabled"
}
]
}
Expand All @@ -18,6 +22,10 @@
{
"name": "tunnel_qos_remap",
"status": "invalid_status"
},
{
"name": "mux_tunnel_egress_acl",
"status": "invalid_status"
}
]
}
Expand Down

0 comments on commit 5ad78ab

Please sign in to comment.