Skip to content

[QoS] Add tunnel pipe mode support for IPIP Decap mode to use SAI_TUNNEL_ATTR_DECAP_QOS_DSCP_TO_TC_MAP #21868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

developfast
Copy link
Contributor

@developfast developfast commented Feb 26, 2025

Why I did it

To be ready for 202505 cutoff
Support for pipe mode in IPIP packets when decapped - request from NetScan. Current support is for all platforms except broadcom SKUs. SAI attribute SAI_TUNNEL_ATTR_DECAP_QOS_DSCP_TO_TC_MAP will be used since the decap_dscp_to_tc_map key is set in the template.

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Ran template change on a lab device.

# template
...
{% if "broadcom" in asic_type %}
            "dscp_mode":"uniform",
{% else %}
            "dscp_mode":"pipe",
            "decap_dscp_to_tc_map":"AZURE",
...

# output
{
        "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
            "tunnel_type":"IPINIP",
            "dscp_mode":"uniform",
            "ecn_mode":"copy_from_outer",
            "ttl_mode":"pipe"
        },
        "OP": "SET"
    },

Related sonic-mgmt test change - #17552

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Migrate dscp decap mode to pipe for all platforms except broadcom skus

Link to config_db schema for YANG module changes

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

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -65,7 +65,11 @@
{
"TUNNEL_DECAP_TABLE:IPINIP_SUBNET" : {
"tunnel_type":"IPINIP",
{% if "mlnx" in DEVICE_METADATA.localhost.platform or "cisco" in DEVICE_METADATA.localhost.platform %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to add arista or bcm here? @abhishekd-brcm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't @r12f - will provide info async

Copy link
Collaborator

@dgsudharsan dgsudharsan Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need platform check here? Also please note that Nvidia devices include both mlnx and nvidia in platform name. If you can clarify why this check is needed we need to consider adding nvidia in platform check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some broadcom SKUs do not support pipe mode @dgsudharsan

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should then have a check excluding brcm. Do we know if other vendors too have the same restriction?

@@ -65,7 +65,11 @@
{
"TUNNEL_DECAP_TABLE:IPINIP_SUBNET" : {
"tunnel_type":"IPINIP",
{% if "mlnx" in DEVICE_METADATA.localhost.platform or "cisco" in DEVICE_METADATA.localhost.platform %}
Copy link
Collaborator

@dgsudharsan dgsudharsan Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need platform check here? Also please note that Nvidia devices include both mlnx and nvidia in platform name. If you can clarify why this check is needed we need to consider adding nvidia in platform check.

@developfast
Copy link
Contributor Author

developfast commented Mar 17, 2025

Will modify buildimage tests shortly. Also testing if sonic_asic_platform is exposed in the orchagent container.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@developfast developfast marked this pull request as ready for review March 17, 2025 18:36
@developfast developfast requested a review from lguohan as a code owner March 17, 2025 18:36
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zhangyanzhao zhangyanzhao moved this to 📋 In Plan Features in SONiC 202505 Release Apr 1, 2025
@developfast
Copy link
Contributor Author

developfast commented Apr 2, 2025

@dgsudharsan / @Yakiv-Huryk has Nvidia pushed their pipe mode sdk change into master branch? I ran pipe mode tests on the latest master build SONiC.master.813742-e72b3d6b6 but pipe mode tests are failing.

Steps to reproduce:

  1. Copy the contents of this PR into the /usr/share/sonic/templates/ipinip.json.j2 template in the swss container.
  2. Do a config reload and wait for device to become stable.
  3. Run test_qos_dscp_mapping.py in pipe mode.

I noticed that all packets were getting routed based on the outer dscp value i.e. uniform mode.

Copy link

Commenter does not have sufficient privileges for PR 21868 in repo sonic-net/sonic-buildimage

@developfast developfast requested a review from prsunny April 23, 2025 17:11
@developfast
Copy link
Contributor Author

Waiting till 5/1 on Nvidia's given timeline for proposed changes to master branch. @stephenxs can you pls signoff in the interim.

@developfast
Copy link
Contributor Author

Pipe mode test passes after #22532

03:16:22 test_qos_dscp_mapping._run_test          L0340 INFO   | DSCP to queue mapping test results:
  Inner Packet DSCP Value    Expected Egress Queue    Egress Queue Count  Result      Actual Egress Queue
-------------------------  -----------------------  --------------------  --------  ---------------------
                        0                        1                  2000  SUCCESS                       1
                        1                        1                  2000  SUCCESS                       1
                        2                        1                  2000  SUCCESS                       1
                        3                        3                  2000  SUCCESS                       3
                        4                        4                  2000  SUCCESS                       4
                        5                        2                  2000  SUCCESS                       2
                        6                        1                  2000  SUCCESS                       1
                        7                        1                  2000  SUCCESS                       1
                        8                        0                  2000  SUCCESS                       0
                        9                        1                  2000  SUCCESS                       1
                       10                        1                  2000  SUCCESS                       1
                       11                        1                  2000  SUCCESS                       1
                       12                        1                  2000  SUCCESS                       1
                       13                        1                  2000  SUCCESS                       1
                       14                        1                  2000  SUCCESS                       1
                       15                        1                  2000  SUCCESS                       1
                       16                        1                  2000  SUCCESS                       1
                       17                        1                  2000  SUCCESS                       1
                       18                        1                  2000  SUCCESS                       1
                       19                        1                  2000  SUCCESS                       1
                       20                        1                  2000  SUCCESS                       1
                       21                        1                  2000  SUCCESS                       1
                       22                        1                  2000  SUCCESS                       1
                       23                        1                  2000  SUCCESS                       1
                       24                        1                  2000  SUCCESS                       1
                       25                        1                  2000  SUCCESS                       1
                       26                        1                  2000  SUCCESS                       1
                       27                        1                  2000  SUCCESS                       1
                       28                        1                  2000  SUCCESS                       1
                       29                        1                  2000  SUCCESS                       1
                       30                        1                  2000  SUCCESS                       1
                       31                        1                  2000  SUCCESS                       1
                       32                        1                  2000  SUCCESS                       1
                       33                        1                  2000  SUCCESS                       1
                       34                        1                  2000  SUCCESS                       1
                       35                        1                  2000  SUCCESS                       1
                       36                        1                  2000  SUCCESS                       1
                       37                        1                  2000  SUCCESS                       1
                       38                        1                  2000  SUCCESS                       1
                       39                        1                  2000  SUCCESS                       1
                       40                        1                  2000  SUCCESS                       1
                       41                        1                  2000  SUCCESS                       1
                       42                        1                  2000  SUCCESS                       1
                       43                        1                  2000  SUCCESS                       1
                       44                        1                  2000  SUCCESS                       1
                       45                        1                  2000  SUCCESS                       1
                       46                        5                  2000  SUCCESS                       5
                       47                        1                  2000  SUCCESS                       1
                       48                        6                  2000  SUCCESS                       6
                       49                        1                  2000  SUCCESS                       1
                       50                        1                  2000  SUCCESS                       1
                       51                        1                  2000  SUCCESS                       1
                       52                        1                  2000  SUCCESS                       1
                       53                        1                  2000  SUCCESS                       1
                       54                        1                  2000  SUCCESS                       1
                       55                        1                  2000  SUCCESS                       1
                       56                        1                  2000  SUCCESS                       1
                       57                        1                  2000  SUCCESS                       1
                       58                        1                  2000  SUCCESS                       1
                       59                        1                  2000  SUCCESS                       1
                       60                        1                  2000  SUCCESS                       1
                       61                        1                  2000  SUCCESS                       1
                       62                        1                  2000  SUCCESS                       1
                       63                        1                  2000  SUCCESS                       1
PASSED

=========================== short test summary info ============================
PASSED qos/test_qos_dscp_mapping.py::TestQoSSaiDSCPQueueMapping_IPIP_Base::test_dscp_to_queue_mapping_pipe_mode

@prsunny
Copy link
Contributor

prsunny commented May 14, 2025

Please update sonic-mgmt test to description

@kperumalbfn
Copy link
Contributor

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@developfast
Copy link
Contributor Author

Please update sonic-mgmt test to description

added

@developfast
Copy link
Contributor Author

@kperumalbfn can you check why Test kvmtest-dualtor-t0 by Elastictest is not running again?

@kperumalbfn
Copy link
Contributor

@developfast 4hr max for each test and will be cancelled by the pipeline. I have restarted

@developfast
Copy link
Contributor Author

@dgsudharsan your requested change review is blocking PR merge, would you mind approving?

@developfast
Copy link
Contributor Author

@kperumalbfn the Test kvmtest-t0 by Elastictest keeps timing out - can we increase the timeout or bypass the check? Nothing is failing

@dgsudharsan
Copy link
Collaborator

@prsunny @developfast @kperumalbfn Are we planning to take this change to 202505? If yes can we add label?

lotus-nexthop pushed a commit to nate-nexthop/sonic-buildimage that referenced this pull request May 24, 2025
…NEL_ATTR_DECAP_QOS_DSCP_TO_TC_MAP (sonic-net#21868)

[QoS] Add tunnel pipe mode support for IPIP Decap mode to use SAI_TUNNEL_ATTR_DECAP_QOS_DSCP_TO_TC_MAP
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #22715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

10 participants