Skip to content

Add SYSTEM_DEFAULTS['decap_qos_map'] to control IPInIP decap_dscp_to_tc_map#28588

Open
markx-arista wants to merge 1 commit into
sonic-net:masterfrom
markx-arista:use-system-defaults-for-ipinip-decap
Open

Add SYSTEM_DEFAULTS['decap_qos_map'] to control IPInIP decap_dscp_to_tc_map#28588
markx-arista wants to merge 1 commit into
sonic-net:masterfrom
markx-arista:use-system-defaults-for-ipinip-decap

Conversation

@markx-arista

Copy link
Copy Markdown
Contributor

Why I did it

Currently ipinip.json.j2 is having platform checks for enabling/disabling decap entries. We want to prevent having platform checks for simple enable/disable scenarios.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Use SYSTEM_DEFAULTS['decap_qos_map']['status'] to control decap_dscp_to_tc_map instead of hardcoded ASIC vendor and hwsku checks. The decap_qos_map default is set in init_cfg.json.j2 (disabled for broadcom, enabled for others) and can be overridden per-SKU via golden config.

How to verify it

decap_qos_remap is set to disabled for Broadcom platforms, and enabled for others.

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

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608
  • N/A

Test result

With decap_qos_map disabled, decap_dscp_to_tc_map is not set:

admin@qspf201:~$ sonic-cfggen -d -v "SYSTEM_DEFAULTS"
{'decap_qos_map': {'status': 'disabled'}, 'mux_tunnel_egress_acl': {'status': 'disabled'}}

admin@qspf201:~$ sonic-db-cli APPL_DB HGETALL "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL"
{'dscp_mode': 'pipe', 'ecn_mode': 'copy_from_outer', 'ttl_mode': 'pipe', 'tunnel_type': 'IPINIP'}

admin@qspf201:~$ sonic-db-cli APPL_DB HGETALL "TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL"
{'dscp_mode': 'pipe', 'ecn_mode': 'copy_from_outer', 'ttl_mode': 'pipe', 'tunnel_type': 'IPINIP'}

With golden config enabling decap_qos_map:

admin@qspf201:~$ sonic-cfggen -d -v "SYSTEM_DEFAULTS"
{'decap_qos_map': {'status': 'enabled'}, 'mux_tunnel_egress_acl': {'status': 'disabled'}}

admin@qspf201:~$ sonic-db-cli APPL_DB HGETALL "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL"
{'decap_dscp_to_tc_map': 'AZURE', 'dscp_mode': 'uniform', 'ecn_mode': 'copy_from_outer', 'ttl_mode': 'pipe', 'tunnel_type': 'IPINIP'}

admin@qspf201:~$ sonic-db-cli APPL_DB HGETALL "TUNNEL_DECAP_TABLE:IPINIP_V6_TUNNEL"
{'decap_dscp_to_tc_map': 'AZURE', 'dscp_mode': 'uniform', 'ecn_mode': 'copy_from_outer', 'ttl_mode': 'pipe', 'tunnel_type': 'IPINIP'}

Description for the changelog

Use SYSTEM_DEFAULTS['decap_qos_map']['status'] to control decap_dscp_to_tc_map

Link to config_db schema for YANG module changes

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

Use SYSTEM_DEFAULTS['decap_qos_map']['status'] to control
decap_dscp_to_tc_map instead of hardcoded ASIC vendor and hwsku checks.
The decap_qos_map default is set in init_cfg.json.j2 (disabled for
broadcom, enabled for others) and can be overridden per-SKU via golden
config.

Signed-off-by: markxiao <markxiao@arista.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202511,202605.
Added label(s) for branch(es) 202511,202605.

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): 202511,202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202511: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants