-
Notifications
You must be signed in to change notification settings - Fork 497
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
SAI proposal for icmp echo offload #2020
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update with:
- Jai's questions in the offline emails
- LAG solution
Signed-off-by: chikkaiah-work <[email protected]> fix sanity Signed-off-by: chikkaiah-work <[email protected]> add LAG info Signed-off-by: chikkaiah-work <[email protected]> sanity fix Signed-off-by: chikkaiah-work <[email protected]> fix sanity Signed-off-by: chikkaiah-work <[email protected]> sanity fix Signed-off-by: chikkaiah-work <[email protected]> sanity fix Signed-off-by: chikkaiah-work <[email protected]>
Signed-off-by: chikkaiah-work <[email protected]>
|
closed by mistake |
Added SAI_ICMP_ECHO_SESSION_ATTR_RX_PORT to specify RX port. |
* @flags CREATE_ONLY | ||
* @default true | ||
*/ | ||
SAI_ICMP_ECHO_SESSION_ATTR_HW_LOOKUP_VALID = SAI_ICMP_ECHO_SESSION_ATTR_START, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe hw lookup means that ICMP packet is forwarded using L3 lookup instead of forwarding to a port. Please rename the attribute and add comments to that intent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. It's intended for L3 lookup for forwarding. I am willing to rename it, but the same naming convention is also used in saitwamp.h and saibfd.h, and I prefer to maintain consistency. Please let me know if still want me to rename it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case please add details in comments clearly stating what happens when flag is set to true or false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a brief description for this attribute. Also, this attribute is mentioned explained in the examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank You
* @objects SAI_OBJECT_TYPE_PORT | ||
* @condition SAI_ICMP_ECHO_SESSION_ATTR_HW_LOOKUP_VALID == false | ||
*/ | ||
SAI_ICMP_ECHO_SESSION_ATTR_PORT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that session is created between peering links. How do we specify more sessions i.e. monitoring between multiple peering links
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for directly connected ports. only one session is allowed per port. same concept as in BFD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that SONiC has to create multiple echo sessions; one per peering ports.
If thats the requirement then you may want to add the CRM attribute in switch. Something like
SAI_SWITCH_ATTR_AVAILABLE_ICMP_ECHO_SESSIONS read only attribute.
Initial read will give the max and as more sessions as added subsequent reads will give remaining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added SAI_SWITCH_ATTR_AVAILABLE_ICMP_ECHO_SESSION and SAI_SWITCH_ATTR_MAX_ICMP_ECHO_SESSION.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank You
* @flags CREATE_AND_SET | ||
* @default false | ||
*/ | ||
SAI_ICMP_ECHO_SESSION_ATTR_SET_NEXT_HOP_GROUP_SWITCHOVER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very fuzzy. What happens if there are multiple such protection NHGs. How does this attribute indicates which one to of the protection NHG takes effect. We just can't trigger all the protection NHG to take over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chikkaiah-work Please look at this comment as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You brought up a valid point. If it's possible for various NHGs to share the same monitor object, it seems reasonable to consider modifying this attribute to the NHG object ID. Should this attribute be left unset (which is null as default), automatic switchover will not occur. Instead, the switchover should be initiated based on the specified NHG. Please let me know if this sounds fine to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attribute is acting as a knob to enable/disable the switchover of the protection groups that have monitor object as this ICMP echo session.
@chikkaiah-work, maybe you could provide protection group examples to justify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lolyu, you are right. Also I have updated the FRR document by mentioning echo session could be included as monitor object. I have added an example under the section "ICMP echo session with protection group"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the spec with an example workflow. Looks good to me.
doc/SAI-Proposal-ICMP-ECHO.md
Outdated
#### sai_icmp_echo_session_attr_t #### | ||
This defines icmp echo session attributes. These attributes collectively define the configuration and behavior of ICMP echo sessions in the SAI framework. | ||
|
||
- SAI_ICMP_ECHO_SESSION_ATTR_VIRTUAL_ROUTER: Specifies whether hardware lookup is valid, allowing for virtual router configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be SAI_ICMP_ECHO_SESSION_ATTR_HW_LOOKUP_VALID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
``` | ||
***GUID:*** Global unique identifier for the ICMP echo session to correlate probe and reply packets with a session, especially when the session is offloaded to hardware, a unique identifier is required. | ||
|
||
***Session Cookie:*** The offloading engine interprets this value to decide whether the packet should undergo processing by the ICMP echo session or not. Packets not matching the cookie are punted to NOS. This can also be used to differentiate regular icmp response and icmp link monitoring response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use the same cookie for sessions on the same device or we can use multiple cookies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each session can share the same cookie, but if a device needs to communicate with multiple devices, each session can have its own unique cookie. The decision to assign cookies to sessions is implementation-specific, and the device can implement a check to enforce the desired behavior.
|
||
### 4.0 Examples ### | ||
|
||
#### 4.0.1 Create session using egress interface: #### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide examples with LAG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a section "ICMP echo session with LAG" and explained session creation process.
* @flags CREATE_AND_SET | ||
* @default false | ||
*/ | ||
SAI_ICMP_ECHO_SESSION_ATTR_SET_NEXT_HOP_GROUP_SWITCHOVER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attribute is acting as a knob to enable/disable the switchover of the protection groups that have monitor object as this ICMP echo session.
@chikkaiah-work, maybe you could provide protection group examples to justify this.
|
||
### 4.0 Examples ### | ||
|
||
#### 4.0.1 Create session using egress interface: #### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, please provide examples of sessions with protection group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added example with section tiltled " ICMP echo session with protection group"
Signed-off-by: chikkaiah-work <[email protected]>
doc/SAI-Proposal-ICMP-ECHO.md
Outdated
@@ -422,3 +469,12 @@ void myCallbackFunction(uint32_t count, sai_icmp_echo_session_state_notification | |||
} | |||
} | |||
``` | |||
### ICMP echo session with LAG ### | |||
|
|||
- Sessions across a LAG bundle: Individual sessions are created on each of the member links. The device creates ICMP echo requests for each configured probing session, which are sent through the port specified by the Session attribute SAI_ICMP_ECHO_SESSION_ATT_PORT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/SAI_ICMP_ECHO_SESSION_ATT_PORT/SAI_ICMP_ECHO_SESSION_ATTR_PORT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Signed-off-by: chikkaiah-work <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Please wait for Jai's approval before merging.
@kcudnik - can you please help merge this. |
Signed-off-by: siqbal1986 <[email protected]>
This specification suggests:
Creating this PR to recommit #1943.