Skip to content

Commit 5ad78ab

Browse files
authored
[Dual-ToR] add default value for ACL rule for mellanox platform (#13547)
- 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 <[email protected]>
1 parent 5a2a959 commit 5ad78ab

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

files/build_templates/init_cfg.json.j2

+11
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,16 @@
133133
"digits_class": "true",
134134
"special_class": "true"
135135
}
136+
},
137+
"SYSTEM_DEFAULTS" : {
138+
{%- if include_mux == "y" %}
139+
"mux_tunnel_egress_acl": {
140+
{%- if sonic_asic_platform == "mellanox" %}
141+
"status": "enabled"
142+
{% else %}
143+
"status": "disabled"
144+
{% endif %}
145+
}
146+
{% endif %}
136147
}
137148
}

src/sonic-yang-models/tests/files/sample_config_db.json

+4
Original file line numberDiff line numberDiff line change
@@ -2227,6 +2227,10 @@
22272227
"SYSTEM_DEFAULTS": {
22282228
"tunnel_qos_remap": {
22292229
"status": "enabled"
2230+
},
2231+
"mux_tunnel_egress_acl":
2232+
{
2233+
"status": "enabled"
22302234
}
22312235
},
22322236
"LOSSLESS_TRAFFIC_PATTERN": {

src/sonic-yang-models/tests/yang_model_tests/tests_config/system_defaults.json

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
{
77
"name": "tunnel_qos_remap",
88
"status": "enabled"
9+
},
10+
{
11+
"name": "mux_tunnel_egress_acl",
12+
"status": "enabled"
913
}
1014
]
1115
}
@@ -18,6 +22,10 @@
1822
{
1923
"name": "tunnel_qos_remap",
2024
"status": "invalid_status"
25+
},
26+
{
27+
"name": "mux_tunnel_egress_acl",
28+
"status": "invalid_status"
2129
}
2230
]
2331
}

0 commit comments

Comments
 (0)