Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions inc/sainexthopgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -359,6 +375,15 @@ typedef enum _sai_next_hop_group_attr_t
*/
SAI_NEXT_HOP_GROUP_ATTR_ADMIN_ROLE,

/**
* @brief This attribute indicates if all the members are with weights or are unweighted

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please add some more text to bring out that this attribute is an hint. For e.g., a NOS can set the type as SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_WEIGHTED and still not give any weights to the members. On the other hand, if the NOS sets the type as SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_UNWEIGHTED, the NOS MUST NOT give any weights to the members.

    "This attribute is for the NOS to provide a hint that members of this group will be created with weights. When this is set as SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_UNWEIGHTED, it allows the SAI implementation to optimize hardware resources for ECMP."

  2. We need to describe the relationship with SAI_NEXT_HOP_GROUP_ATTR_TYPE.
    Example:
    @validonly SAI_NEXT_HOP_GROUP_ATTR_TYPE == SAI_NEXT_HOP_GROUP_TYPE_DYNAMIC_UNORDERED_ECMP or SAI_NEXT_HOP_GROUP_ATTR_TYPE == SAI_NEXT_HOP_GROUP_TYPE_DYNAMIC_ORDERED_ECMP

*
* @type sai_next_hop_group_members_weight_t
* @flags CREATE_ONLY
* @default SAI_NEXT_HOP_GROUP_MEMBERS_WEIGHT_DONT_CARE
*/
SAI_NEXT_HOP_GROUP_ATTR_MEMBERS_WEIGHT,

Comment thread
JaiOCP marked this conversation as resolved.
/**
* @brief End of attributes
*/
Expand Down
Loading