Skip to content

[action] [PR:3535] [swss]: IcmpOrch to support ICMP session offload to ASIC#3685

Merged
mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld:cherry/202505/3535
Jun 6, 2025
Merged

[action] [PR:3535] [swss]: IcmpOrch to support ICMP session offload to ASIC#3685
mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld:cherry/202505/3535

Conversation

@mssonicbld
Copy link
Collaborator

What I did
IcmpOrch for supporting hardware offloaded ICMP echo sessions.
Changes done here adds support for the SAI ICMP ECHO spec:
https://github.com/opencomputeproject/SAI/blob/master/doc/SAI-Proposal-ICMP-ECHO.md

A common template in saioffloadsession.h is added for handling sai offload sessions. BFD or any future offload session handling can be migrated to this template.

IcmpOrch will create sessions based on switch capability published in STATE_DB by switchcorch which is checked in IcmpOrch's constructor.

STATE_DB SWITCH_CAPABILITY:

  "SWITCH_CAPABILITY|switch": {
    "value": {
<snip>
...
      "ICMP_OFFLOAD_CAPABLE": "true",
...
<snip>
    }
  },

Why I did it
ICMP echo sessions are used by LinkMgrd to monitor link state in Dual-ToR architecture and switch traffic.
Current software based ICMP echo sessions used by Linkprober in LinkMgrd limits the detection time and uses host network bandwidth.
Hardware based sessions will bring down the detection time and host network bandwidth is not used.

How I verified it
Tested the changes with DVS.

Details if related
ICMP echo table definitions: sonic-net/sonic-swss-common#980
ICMP echo SaiRedis changes: sonic-net/sonic-sairedis#1542

<!--
Please make sure you have read and understood the contribution guildlines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

1. Make sure your commit includes a signature generted with `git commit -s`
2. Make sure your commit title follows the correct format: [component]: description
3. Make sure your commit message contains enough details about the change and related tests
4. Make sure your pull request adds related reviewers, asignees, labels

Please also provide the following information in this pull request:
-->

**What I did**
IcmpOrch for supporting hardware offloaded ICMP echo sessions.
Changes done here adds support for the SAI ICMP ECHO spec:
https://github.com/opencomputeproject/SAI/blob/master/doc/SAI-Proposal-ICMP-ECHO.md

A common template in saioffloadsession.h is added for handling sai offload sessions. BFD or any future offload session handling can be migrated to this template.

IcmpOrch will create sessions based on switch capability published in STATE_DB by switchcorch which is checked in IcmpOrch's constructor.

STATE_DB SWITCH_CAPABILITY:
```
  "SWITCH_CAPABILITY|switch": {
    "value": {
<snip>
...
      "ICMP_OFFLOAD_CAPABLE": "true",
...
<snip>
    }
  },
 ```
**Why I did it**
ICMP echo sessions are used by LinkMgrd to monitor link state in Dual-ToR architecture and switch traffic.
Current software based ICMP echo sessions used by Linkprober in LinkMgrd limits the detection time and uses host network bandwidth.
Hardware based sessions will bring down the detection time and host network bandwidth is not used.

**How I verified it**
Tested the changes with DVS.

**Details if related**
ICMP echo table definitions: sonic-net/sonic-swss-common#980
ICMP echo SaiRedis changes: sonic-net/sonic-sairedis#1542
@mssonicbld
Copy link
Collaborator Author

Original PR: #3535

@mssonicbld
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@@ -0,0 +1,762 @@
import pytest

Check notice

Code scanning / CodeQL

Unused import Note test

Import of 'pytest' is not used.
@mssonicbld mssonicbld merged commit 9c860b1 into sonic-net:202505 Jun 6, 2025
5 checks passed
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.

1 participant