Skip to content

Commit 15cdc36

Browse files
rbpittmangshemesh2
authored andcommitted
Default the inner dscp to outer dscp map to be 1-1. (sonic-net#17860)
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
1 parent 4949602 commit 15cdc36

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/qos/tunnel_qos_remap_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,14 @@ def tunnel_qos_maps(rand_selected_dut, dut_qos_maps_module): # noqa F811
178178
# inner_dscp_to_outer_dscp_map, a map for rewriting DSCP in the encapsulated packets
179179
ret['inner_dscp_to_outer_dscp_map'] = {}
180180
if 'cisco-8000' in asic_type:
181+
dscps_present = []
181182
for k, v in list(maps['TC_TO_DSCP_MAP'][TUNNEL_MAP_NAME].items()):
182183
ret['inner_dscp_to_outer_dscp_map'][int(k)] = int(v)
184+
dscps_present.append(int(k))
185+
# Fill in default-values in the map to be 1-1
186+
for dscp in range(64):
187+
if dscp not in dscps_present:
188+
ret['inner_dscp_to_outer_dscp_map'][dscp] = dscp
183189
else:
184190
for k, v in list(maps['DSCP_TO_TC_MAP'][MAP_NAME].items()):
185191
ret['inner_dscp_to_outer_dscp_map'][int(k)] = int(

0 commit comments

Comments
 (0)