diff --git a/dockers/docker-orchagent/ipinip.json.j2 b/dockers/docker-orchagent/ipinip.json.j2 index ae0106fa68..e6bf5b95bb 100644 --- a/dockers/docker-orchagent/ipinip.json.j2 +++ b/dockers/docker-orchagent/ipinip.json.j2 @@ -59,6 +59,13 @@ {%- set ipv4_addresses = ipv4_loopback_addresses + ipv4_vlan_addresses %} {%- set ipv6_addresses = ipv6_loopback_addresses + ipv6_vlan_addresses %} {% endif %} + +{# Check if AZURE QoS map exists #} +{% set azure_qos_exists = false %} +{% if DSCP_TO_TC_MAP is defined and DSCP_TO_TC_MAP.AZURE is defined %} +{% set azure_qos_exists = true %} +{% endif %} + [ {% if ipv4_loopback_addresses %} {% if subnet_decap.enable %} @@ -66,6 +73,9 @@ "TUNNEL_DECAP_TABLE:IPINIP_SUBNET" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", +{% if azure_qos_exists %} + "decap_dscp_to_tc_map":"AZURE", +{% endif %} {% if "mlnx" in DEVICE_METADATA.localhost.platform %} "ecn_mode":"standard", {% else %} @@ -92,6 +102,9 @@ "dscp_mode":"pipe", {% else %} "dscp_mode":"uniform", +{% if azure_qos_exists %} + "decap_dscp_to_tc_map":"AZURE", +{% endif %} {% endif %} {% if "mlnx" in DEVICE_METADATA.localhost.platform %} "ecn_mode":"standard", @@ -123,6 +136,9 @@ "TUNNEL_DECAP_TABLE:IPINIP_SUBNET_V6" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", +{% if azure_qos_exists %} + "decap_dscp_to_tc_map":"AZURE", +{% endif %} {% if "mlnx" in DEVICE_METADATA.localhost.platform %} "ecn_mode":"standard", {% else %} @@ -149,6 +165,9 @@ "dscp_mode":"pipe", {% else %} "dscp_mode":"uniform", +{% if azure_qos_exists %} + "decap_dscp_to_tc_map":"AZURE", +{% endif %} {% endif %} {% if "mlnx" in DEVICE_METADATA.localhost.platform %} "ecn_mode":"standard", diff --git a/src/sonic-config-engine/tests/multi_npu_data/py3/ipinip.json b/src/sonic-config-engine/tests/multi_npu_data/py3/ipinip.json index 94196a0a48..4513903c91 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/py3/ipinip.json +++ b/src/sonic-config-engine/tests/multi_npu_data/py3/ipinip.json @@ -3,6 +3,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, @@ -42,6 +43,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/ipinip.json b/src/sonic-config-engine/tests/sample_output/py3/ipinip.json index 755e954cfb..ef404b929e 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/ipinip.json +++ b/src/sonic-config-engine/tests/sample_output/py3/ipinip.json @@ -3,6 +3,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, @@ -66,6 +67,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json b/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json index abcfa56eae..6b6d4a63db 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json +++ b/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json @@ -3,6 +3,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_SUBNET" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, @@ -26,6 +27,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, @@ -89,6 +91,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_SUBNET_V6" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" }, @@ -98,6 +101,7 @@ "TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL" : { "tunnel_type":"IPINIP", "dscp_mode":"uniform", + "decap_dscp_to_tc_map":"AZURE", "ecn_mode":"copy_from_outer", "ttl_mode":"pipe" },