Skip to content

Commit b18cfc3

Browse files
committed
Addressed some review comments
Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
1 parent ce5bdda commit b18cfc3

5 files changed

Lines changed: 22 additions & 17 deletions

doc/dualtor/ICMP_Hardware_Offload_and_Protecion.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ This document describes high level design details of SONiC's ICMP Hardware Offlo
2929
- [Session GUID handling](#session-guid-handling)
3030
- [Peer session handling](#peer-session-handling)
3131
- [Timer considerations](#timer-considerations)
32-
- [Link State transition](#link-state-transition)
32+
- [Link Prober State transitions](#link-prober-state-transitions)
33+
- [TLV generation consideration](#tlv-generation-consideration)
3334
- [Orchagent](#orchagent)
3435
- [IcmpOrch](#icmporch)
3536
- [MuxOrch](#muxorch)
@@ -41,7 +42,6 @@ This document describes high level design details of SONiC's ICMP Hardware Offlo
4142
- [State-DB](#state-db)
4243
- [Command Line](#command-line)
4344
- [Limitations](#limitations)
44-
- [Warm Reboot Support](#warm-reboot-support)
4545
- [Testing](#testing)
4646

4747
<!-- /code_chunk_output -->
@@ -66,13 +66,18 @@ Currently switching time after link state change is detected is around 25-50 mil
6666

6767
### High Level Component and Requirements
6868
#### LinkMgrd Requirements
69-
LinkMgrd is the central component that runs in MUX docker and is responsible for managing ICMP echo sessions and link state. Link prober sub-component in Linkmgrd is responsible for the ICMP echo sessions.
69+
LinkMgrd is the central component that runs in MUX docker and is responsible for managing ICMP echo sessions and link state. Link prober sub-component in Linkmgrd is responsible for the ICMP echo sessions.
7070
* Requirements
7171
* Add / Remove Hardware ICMP echo session in App DB based on mux cable and link prober config entries.
7272
* Consume ICMP echo session state from State DB produced by Orchagent and update mux state.
73+
* Create two hardware sessions per mux port / interface one for self and another one to monitor the peer replies.
74+
* Generate and handle ICMP packets with TLVs in software.
75+
76+
Following diagram shows the hardware ICMP echo sessions between the TORs and Server.
77+
<div align="center"> <img src=image/hw_icmp_echo_sessions.png width=600 /> </div>
7378

7479
#### Orchagent Requirement
75-
Currently orchagent creates tunnel at initialization and add / removes routes to forward traffic to peer ToR via a IpinIP tunnel when linkmgrd switches state to standby / active.
80+
Currently orchagent creates tunnel at initialization and add / removes routes to forward traffic to peer ToR via a IpinIP tunnel when linkmgrd switches state to standby / active.
7681
* Requirements
7782
* Create / Remove hardware ICMP echo sessions by consuming entries in App DB.
7883
* Consume ICMP echo session notification from SAI and update session state in State DB.
@@ -108,15 +113,18 @@ Hardware Link prober needs to know the peer session GUID to set the peer session
108113
* **ICMP echo session tx_interval setting:**
109114
* tx_interval = probing interval
110115
* Positive probing timer value = probing interval x positive signal count.
111-
* LinkMgrd will start positive probing timer after receiving the first UP state notification for a session from State DB and move the link state from unknown to wait state. After this when positive timer expires it will transition the Link from wait state to Active state.
116+
* LinkMgrd will start positive probing timer after receiving the first UP state notification for a session from State DB and link prober will conitnue to remain in unknown state until the expiry of this positive timer at which it will transition the Link prober to Active state.
112117
* **ICMP echo session rx_interval setting:**
113118
* rx_interval = probing interval x negative signal count.
114-
* LinkMgrd will directly transition the link to unknown state avoiding the wait state as opposed to what was done in case of software probing.
119+
* LinkMgrd will directly transition the link prober to unknown state avoiding the negative probing timer as opposed to what was done in case of software probing.
115120

116-
#### Link State transitions
117-
Following table shows the mux state transitions based on event when link_prober mode is set as hardware and icmp echo session is offloaded to NPU.
121+
#### Link Prober State transitions
122+
Following table shows the link prober state transitions based on event when link_prober mode is set as hardware and icmp echo session is offloaded to NPU.
118123
<div align="center"> <img src=image/link_state_transition.png width=600 /> </div>
119124

125+
#### TLV generation considerations
126+
ICMP packets with TLVs will not be generated by the hardware/NPU and LinkMgrd will generate these packets in software using the software cookie as currently done by software prober. Using the software cookie for TLV generation will make sure peer NPU will not consume these ICMP packets in hardware and LinkMgrd running on peer ToR will be able to receive and handle these TLV packets.
127+
120128
### Orchagent
121129
#### IcmpOrch
122130
IcmpOrch is a new component introduced which consumes icmp echo session entries from App DB ICMP_ECHO_SESSION_TABLE and programs the ICMP hardware offload sessions in NPU. It receives icmp echo session state notifications from SAI / NPU and produces session state in State DB ICMP_ECHO_SESSION_TABLE that is consumed by LinkMgrd.
@@ -143,7 +151,7 @@ This feature introduces a new config knob **switching_mode** to differentiate be
143151
MuxOrch creates the IPinIP tunnel based on the peer_switch configuration. Currently IPinIP tunnel destination next hop is created when mux state changes to standby however with frr_protection switching_mode it will create the IPinIP tunnel destination next hop in advance and add this as the backup member of the next hop protection group.
144152

145153
#### MuxCableOrch
146-
MuxCableOrch in orchagent is the component responsible for consuming mux state from App DB APP_MUX_CABLE_TABLE_NAME and switching traffic. Currently this component updates all routes whenever a traffic switchover is needed. When **switching_mode** will be set to **frr-protection** in MuxOrch, MuxCableOrch will program the routes with the nexthop protection group as destination. With frr-protection mode in the event of traffic switching, SONiC will just toggle the members of nexthop protection group and will no longer need to reprogram all routes.
154+
MuxCableOrch in orchagent is the component responsible for consuming mux state from App DB MUX_CABLE_TABLE and switching traffic. Currently this component updates all routes whenever a traffic switchover is needed. When **switching_mode** will be set to **frr-protection** in MuxOrch, MuxCableOrch will program the routes with the nexthop protection group as destination. With frr-protection mode in the event of traffic switching, SONiC will just toggle the members of nexthop protection group and will no longer need to reprogram all routes.
147155

148156
Following diagram shows component level flow for traffic switching.
149157
<div align="center"> <img src=image/traffic_switching_flow.png width=700 /> </div>
@@ -155,7 +163,7 @@ Currently when FDB changes or neighbor changes, neighbors are updated based on t
155163

156164
#### Config-DB
157165
Two new knobs in MUX_CABLE config table to support these features:
158-
* **link_prober_type**
166+
* **link_prober_type**
159167
* software : create software based icmp echo session. This is default value.
160168
* hardware : create hardware based icmp echo session.
161169
* **switching_mode**
@@ -179,7 +187,7 @@ Two new knobs in MUX_CABLE config table to support these features:
179187
```
180188

181189
#### App-DB
182-
A new table, named **ICMP_ECHO_SESSION_TABLE**, will be introduced in the App DB to create hardware based icmp echo sessions. Entries in this table will be produced by LinkMgrd and consumed by Orchagent.
190+
A new table, named **ICMP_ECHO_SESSION_TABLE**, will be introduced in the App DB to create hardware based icmp echo sessions. Entries in this table will be produced by LinkMgrd and consumed by Orchagent.
183191

184192
```
185193
{
@@ -233,8 +241,8 @@ A new table **ICMP_ECHO_SESSION_TABLE** will be added in the State DB. Entries i
233241
* `state`: mux mode configuration
234242
* `auto`: enable failover logics for both self and peer
235243
* `manual`: disable failover logics for both self and peer
236-
* `active`: if current mux status is not `active`, toggle the mux to `active` once, then work in `manual` mode
237-
* `standby`: if current mux status is not `standby`, toggle the mux `standby` once, then work in `manual` mode
244+
* `active`: if current mux status is not `active`, toggle the mux to `active` once
245+
* `standby`: if current mux status is not `standby`, toggle the mux `standby` once
238246
* `detach`: enable failover logics only for self
239247
* `ipv4`: mux server ipv4 address
240248
* `ipv6`: mux server ipv6 address
@@ -258,7 +266,7 @@ $ show mux config
258266
SWITCH_NAME PEER_TOR
259267
----------------- ----------
260268
lab-switch-2 10.1.0.33
261-
port state ipv4 ipv6 cable_type soc_ipv4 link_prober_type switching_mode
269+
port state ipv4 ipv6 cable_type soc_ipv4 link_prober_type switching_mode
262270
---------- ------- --------------- ----------------- ------------- --------------- ---------------- --------------
263271
Ethernet4 auto 192.168.0.2/32 fc02:1000::2/128 active-active 192.168.0.3/32 hardware frr-protection
264272
Ethernet8 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.0.5/32 hardware frr-protection
@@ -270,9 +278,6 @@ Ethernet8 auto 192.168.0.4/32 fc02:1000::4/128 active-active 192.168.
270278

271279
- Software and Hardware link prober sessions are not supported together.
272280

273-
## Warm Reboot Support
274-
TBD
275-
276281
## Testing
277282
- Unit tests for LinkMgrd
278283
- Unit tests for IcmpOrch
49.2 KB
Loading
1.44 KB
Loading
55.8 KB
Loading
19 KB
Loading

0 commit comments

Comments
 (0)