Skip to content
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

[subnet_decap] Add subnet decap #3117

Merged
merged 24 commits into from
May 28, 2024
Merged

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Apr 18, 2024

What I did
Add subnet decap feature:

  1. Enable TunnelDecapOrch to subsribe to the tunnel and decap term table to create/remove tunnel and decap terms.
  2. Allow MP2MP decap term creation/removal.
  3. Enable TunnelDecapOrch to subscribe to subnet decap table and respond to source IP change by changing the source IPs of the decap terms related to the subnet decap.
  4. Enhance tunnelmgrd to adapt to the tunnel/decap term db schema change
  • Microsoft ADO (number only): 27768412

HLD: sonic-net/SONiC#1657

Signed-off-by: Longxiang Lyu lolv@microsoft.com

Why I did it
Enable SONiC to add subnet decap rules and support changing decap rules on-the-fly.

How I verified it
VS test and physical testbed.

Details if related

@lolyu lolyu force-pushed the add_subnet_decap branch 3 times, most recently from 649418e to dbd9aae Compare April 18, 2024 03:11
@lolyu lolyu requested a review from bingwang-ms April 19, 2024 01:30
@lolyu lolyu force-pushed the add_subnet_decap branch from 11b3498 to 7b45658 Compare April 19, 2024 07:46
@lolyu lolyu changed the title [WIP] Add subnet decap Add subnet decap Apr 22, 2024
@lolyu lolyu marked this pull request as ready for review April 22, 2024 09:47
@lolyu lolyu requested a review from prsunny as a code owner April 22, 2024 09:47
@lolyu lolyu force-pushed the add_subnet_decap branch from 6126192 to 1ec6b7e Compare April 23, 2024 05:21
@lolyu
Copy link
Contributor Author

lolyu commented Apr 25, 2024

/azp run

Copy link

Commenter does not have sufficient privileges for PR 3117 in repo sonic-net/sonic-swss

cfgmgr/tunnelmgr.cpp Outdated Show resolved Hide resolved
@lolyu lolyu requested a review from bingwang-ms May 8, 2024 02:52
lolyu added 4 commits May 10, 2024 12:32
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the add_subnet_decap branch from 5f32bec to 9cb4f40 Compare May 10, 2024 12:32
@lolyu lolyu changed the title Add subnet decap [subnet_decap] Add subnet decap May 10, 2024
lolyu added 4 commits May 15, 2024 10:25
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the add_subnet_decap branch from c207e29 to a123451 Compare May 15, 2024 13:12
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
lolyu added 2 commits May 25, 2024 08:58
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@prsunny
Copy link
Collaborator

prsunny commented May 28, 2024

@lolyu , please have HLD link in description

@prsunny prsunny merged commit 353ab92 into sonic-net:master May 28, 2024
17 checks passed
prsunny pushed a commit that referenced this pull request May 31, 2024
* [subnet decap] Add subnet decap rule based on overlay ECMP vxlan tunnel route
What I did
Support dynamic decap rule generation based on the Vxlan tunnel route of Overlay ECMP.
This depends on: #3117

Why I did it
To enable SONiC with the capability to decap IPinIP packets with dest IP in the Overlay ECMP Vxlan tunnel route prefix.
wdoekes added a commit to ossobv/sonic-swss that referenced this pull request Nov 19, 2024
…unnels

The Tomahawk 3 chipset on an Accton AS9716-32D does not do
SAI_TUNNEL_TERM_TABLE_ENTRY_TYPE_P2MP tunnels and returns
SAI_STATUS_NOT_SUPPORTED.

Since sonic-net#3117, such a tunnel is created unconditionally whenever an IP
address is added to Loopback0. The SAI_STATUS_NOT_SUPPORTED is handled
as an unrecoverable error. That takes the orchagent down and syncd along
with it.

    root@spine2:0:~# dmidecode 2>/dev/null | grep -A1 'Manufacturer:' | head -n2
    Manufacturer: Accton
    Product Name: AS9716-32D

    root@spine2:0:~# printf '%s\n' 'bsv' 'show unit' 'ver' |
        xargs -d\\n -n1 bcmcmd -t 1 | grep '^[A-Z]'
    BRCM SAI ver: [11.2.13.1], OCP SAI ver: [1.14.0], SDK ver: [sdk-6.5.30-SP4]
    Unit 0 chip BCM56980_B0 (current)
    Broadcom Command Monitor: Copyright (c) 1998-2024 Broadcom
    Release: sdk-6.5.30-SP4 built 20241016 (Wed Oct 16 13:33:02 2024)
    From root@7ec56acb7b44:/__w/1/s/output/x86-xgsall-deb/xgs-sdk-src/hsdk-all-6.5.30
    Platform: X86
    OS: Unix (Posix)

Logs output:

    NOTICE swss#orchagent: :- addDecapTunnel: Create overlay loopback router
      interface oid:60000000005b2
    NOTICE swss#orchagent: :- doDecapTunnelTask: Tunnel IPINIP_TUNNEL added
      to ASIC_DB.
    ERR syncd#syncd: :- sendApiResponse: api SAI_COMMON_API_CREATE failed in
      syncd mode: SAI_STATUS_NOT_SUPPORTED
    ERR syncd#syncd: :- processQuadEvent: attr:
      SAI_TUNNEL_TERM_TABLE_ENTRY_ATTR_VR_ID: oid:0x3000000000021a
    ...
    ERR swss#orchagent: :- create: create status: SAI_STATUS_NOT_SUPPORTED
    ERR swss#orchagent: :- addDecapTunnelTermEntry: Failed to create tunnel
      decap term entry 10.1.0.1/32.
    ERR swss#orchagent: :- handleSaiCreateStatus: Encountered failure in
      create operation, exiting orchagent, SAI API: SAI_API_TUNNEL, status:
      SAI_STATUS_NOT_SUPPORTED
    NOTICE swss#orchagent: :- notifySyncd: sending syncd: SYNCD_INVOKE_DUMP
    NOTICE syncd#syncd: :- processNotifySyncd: Invoking SAI failure dump

This changeset adds a check for SAI_STATUS_NOT_SUPPORTED, turning the
error into a warning and going back to behaviour before subnet_decap was
added:

    ERR swss#orchagent: :- create: create status: SAI_STATUS_NOT_SUPPORTED
    WARNING swss#orchagent: :- addDecapTunnelTermEntry: Creating SAI_API_TUNNEL
      returned SAI_STATUS_NOT_SUPPORTED for tunnel IPINIP_TUNNEL IP 10.1.0.1/32.
    ERR swss#orchagent: :- doDecapTunnelTermTask: IPINIP_TUNNEL:10.1.0.1: failed
      to add tunnel decap term to ASIC_DB.

Resolves: sonic-net/sonic-buildimage#20837
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