HW FRR switchover notification support for protection groups #2269
HW FRR switchover notification support for protection groups #2269chikkaiah-work wants to merge 2 commits intoopencomputeproject:masterfrom
Conversation
…red-by: Manas Kumar Mandal (manamand) <manamand@cisco.com>Â Signed-off-by: Chikkegowda Chikkaiah <cchikkai@cisco.com>
inc/sainexthopgroup.h
Outdated
| * | ||
| * @objects SAI_OBJECT_TYPE_NEXT_HOP_GROUP | ||
| */ | ||
| sai_object_list_t failed_next_hop_group_obj_list; |
There was a problem hiding this comment.
just wondering if that suffix obj_list is needed, instead of "failed_next_hop_groups" ? we didnt had so far lists defined in any structs so it would be good to establish good convention for future
There was a problem hiding this comment.
agree with you. fixed it.
| This hint is provided using a new NHG type | ||
| ```c | ||
| /** Next hop hardware protection group. This is the group backing up the primary in the protection group type and is managed by hardware */ | ||
| SAI_NEXT_HOP_GROUP_TYPE_HW_PROTECTION, |
There was a problem hiding this comment.
How does SAI Knows which is primary across multiple NHGS created in the system. actually existing model already supports this i think. the only missing is H/w protection with callbacks when there is a state change.
Below is my understanding based on current model
- Protection between Next-Hop Groups (H-ECMP case)
NHG-1: Primary group (Endpoint-1)
NHG-2: Backup group (Endpoint-2)
NHG-3: Parent NHG with:
Member-1: Primary → NHG-1
Member-2: Backup → NHG-2
This models protection at the group level, which is particularly useful for hierarchical ECMP (H-ECMP) scenarios, where failover happens across endpoint groups.
Also, this use-case is already supported in the current model.
Example Flow:
Create NHG-1 with Tunnel endpoint-1
Create NHG-2 with Tunnel endpoint-2
Create NHG-3 and add:
NHG-1 as primary
NHG-2 as secondary (backup)
- Protection within a Next-Hop Group (Member-Level Protection)
In the current SAI model, this can be represented using smaller protected NHGs and composing them into a parent group:
Create NHG-2 with:
Primary → NH1
Backup → NH2
Create NHG-3 with:
Primary → NH2
Backup → NH1
NH3 and NH4 do not have backups
Create NHG-1 and add members:
Member-1: NHG-2
Member-2: NHG-3
Member-3: NH3
Member-4: NH4
This effectively models per-member protection, where some next-hops have protection while others do not.
For the current model, NHG-level notifications on switchover from primary to backup should be sufficient, in my view for H/w based protection. As the protection semantics are already captured through the existing NHG hierarchy/composition
There was a problem hiding this comment.
@sathk-marvell, You are right all these are already exists. I'm just adding notification callback. the way diffs are created is confusing. The new changes are in this file starts from line #162.
Please let me know if I have missed anything form your feedback.
Signed-off-by: Chikkegowda Chikkaiah <cchikkai@cisco.com>
|
To be discussed in SAI community. @tjchadaga |
Added HW FRR switchover notification support for protection groups with a switch-level callback. The new callback reports switchover results per monitored object, including: monitored_oid,
switchover_success_count, and list protection groups that failed switchover. The callback is registered
through SAI_SWITCH_ATTR_NEXT_HOP_GROUP_HW_PROTECTION_SWITCHOVER_NOTIFY.