Skip to content

[202012][cherry-pick] Define SYSTEM_DEFAULTS table to control tunnel_qos_remap#10930

Merged
bingwang-ms merged 3 commits intosonic-net:202012from
bingwang-ms:add_system_defaults_table_202012
May 30, 2022
Merged

[202012][cherry-pick] Define SYSTEM_DEFAULTS table to control tunnel_qos_remap#10930
bingwang-ms merged 3 commits intosonic-net:202012from
bingwang-ms:add_system_defaults_table_202012

Conversation

@bingwang-ms
Copy link
Contributor

Signed-off-by: bingwang [email protected]

Why I did it

This PR is to cherry-pick PR#10877 into 202012 branch after resolving conflicts.

This PR is to define a new table SYSTEM_DEFAULTS to turn on/off new features in SONiC.
Currently, only the flag to turn on/off tunnel_qos_remap is in the new table.
HLD sonic-net/SONiC#982

How I did it

  1. Define a new section in minigraph.xml
<SystemDefaultsDeclaration>
    <a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
		 <a:SystemDefault>
            <a:Name>TunnelQosRemapEnabled</a:Name>
            <a:Value>True</a:Value>
         </a:SystemDefault>
    </a:SystemDefaults>
</SystemDefaultsDeclaration>
  1. Update minigrapg.py to parse the new section, and write into config_db.
  2. The Tunnel Qos remapping feature will be turn off if TunnelQosRemapEnabled=False. Otherwise minigraph.py will try to parse new fields in minigraph.xml, and write the parsed value into config_db.
    The extra values for tunnel qos remapping are as below.
 "src_ip": "25.1.1.10",
 "decap_dscp_to_tc_map": "AZURE_TUNNEL",
 "decap_tc_to_pg_map": "AZURE_TUNNEL",
 "encap_tc_to_dscp_map": "AZURE_TUNNEL",
 "encap_tc_to_queue_map": "AZURE_TUNNEL"

Changes for the templates will be raised in another PR.

How to verify it

Verified by adding new UT cases.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Define SYSTEM_DEFAULTS table to control tunnel_qos_remap.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

bingwang-ms and others added 3 commits May 26, 2022 08:46
@xumia
Copy link
Collaborator

xumia commented May 27, 2022

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms bingwang-ms merged commit c4e806f into sonic-net:202012 May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants