From 95c47716bcbe33b47a009917d4ac2d19519d2ac4 Mon Sep 17 00:00:00 2001 From: JaiOCP Date: Mon, 22 Jun 2026 16:04:52 -0700 Subject: [PATCH 1/2] NHG with Unequal Cost Members Signed-off-by: JaiOCP NHG with UECMP Signed-off-by: JaiOCP --- inc/sainexthopgroup.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/inc/sainexthopgroup.h b/inc/sainexthopgroup.h index a34e9fdf6..89ac55c47 100644 --- a/inc/sainexthopgroup.h +++ b/inc/sainexthopgroup.h @@ -359,6 +359,19 @@ typedef enum _sai_next_hop_group_attr_t */ SAI_NEXT_HOP_GROUP_ATTR_ADMIN_ROLE, + /** + * @brief This attribute indicates the nexthop group members weights + * + * NOS must query this attribute for the support. + * False: All members are with equal cost + * True: Members are configured with unequal cost + * + * @type bool + * @flags CREATE_ONLY + * @default false + */ + SAI_NEXT_HOP_GROUP_ATTR_MEMBERS_WITH_UNEQUAL_WEIGHTS, + /** * @brief End of attributes */ From 6075ead1e7b9a6989946c10903c4652d95a9a520 Mon Sep 17 00:00:00 2001 From: JaiOCP Date: Thu, 25 Jun 2026 12:06:16 -0700 Subject: [PATCH 2/2] NHG with Weighted or unWeighted Members Signed-off-by: JaiOCP --- inc/sainexthopgroup.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/inc/sainexthopgroup.h b/inc/sainexthopgroup.h index 89ac55c47..c1dd26004 100644 --- a/inc/sainexthopgroup.h +++ b/inc/sainexthopgroup.h @@ -141,6 +141,22 @@ typedef struct _sai_next_hop_group_hw_protection_switchover_notification_data_t sai_object_list_t failed_next_hop_groups; } sai_next_hop_group_hw_protection_switchover_notification_data_t; +/** + * @brief Next hop group is configured with weights or not + */ +typedef enum _sai_next_hop_group_members_weight_t +{ + /** This is for legacy platforms where this attribute is don't care */ + SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_DONT_CARE, + + /** Next hop group members are weighted */ + SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_WEIGHTED, + + /** Next hop group members are unweighted */ + SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_UNWEIGHTED, + +} sai_next_hop_group_members_weight_t; + /** * @brief Attribute id for next hop */ @@ -360,17 +376,13 @@ typedef enum _sai_next_hop_group_attr_t SAI_NEXT_HOP_GROUP_ATTR_ADMIN_ROLE, /** - * @brief This attribute indicates the nexthop group members weights - * - * NOS must query this attribute for the support. - * False: All members are with equal cost - * True: Members are configured with unequal cost + * @brief This attribute indicates if all the members are with weights or are unweighted * - * @type bool + * @type sai_next_hop_group_members_weight_t * @flags CREATE_ONLY - * @default false + * @default SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_DONT_CARE */ - SAI_NEXT_HOP_GROUP_ATTR_MEMBERS_WITH_UNEQUAL_WEIGHTS, + SAI_NEXT_HOP_GROUP_ATTR_MEMBERS_WEIGHT, /** * @brief End of attributes