-
Notifications
You must be signed in to change notification settings - Fork 477
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
Next hop group with members. #2013
Next hop group with members. #2013
Conversation
erohsik
commented
May 10, 2024
next hop group member objects are being created this way implicitly, without being returned to the application |
Thanks for taking a look. An example of the modification workflow is in the doc. With this next hop group, if the next hop group starts with {a,b,c,d} and then transitions to {a,b,e}, then the group is modified with the next hop list set to {a,b,e}. There is no explicit deletion of members c and d or addition of e. |
should we mark then and add clarification in the MD, that
|
Thanks for the review. I have updated the PR. |
@erohsik This is a useful enhancement. Thanks for that. I have a comment on the way this is modelled in this proposal. The model is maintaining two different lists: one for the NHs and the other for the weights of the corresponding NH. We cannot atomically add a new NH to a created group- we need [step-1] call to add the NH to group, and [step-2] another call to set the weight. The weights to be programmed in the h/w are inconsistent between step-1 and step-2. This is not elegant and tomorrow if we want to support this say for Ordered ECMP, we would need another list to specify the 'Sequence Id'. We could extend this for every ECMP feature like Fine Grained etc. A cleaner way would be to do one of the below: Option-1: reuse sai_next_hop_group_member:Make SAI_NEXT_HOP_GROUP_MEMBER_ATTR_NEXT_HOP_GROUP_ID mandatory only if NH Group is NOT of type SAI_NEXT_HOP_GROUP_TYPE_ECMP_WITH_MEMBERS. Make the object type of SAI_NEXT_HOP_GROUP_ATTR_NEXT_HOP_LIST as SAI_OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER and remove SAI_NEXT_HOP_GROUP_ATTR_NEXT_HOP_MEMBER_WEIGHT_LIST Option-2: create a new type of sai_next_hop_group_init_member A challenge with option#1 would be to enforce it via SAI metacheckers and backward compatibility. If option#1 is not possible, then we can consider creating a new object type like below (definitely needs a better name).
|
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 consider using a object type instead of maintaining the weights as another list.
Thanks for the review. |
Creating a generic solution for all next hop group types would be more future extensible. |
The current solution looks to be a point fix for a specific NHG type like WECPM and not for other NHG type. How would you handle the case of supporting counters per member Nexthop using the single step workflow? |
you will need to rebase on origin/master and force push to pass metadata check |
ec29e0d
to
4563df5
Compare
@itaibaz - could you please help finish the review on this? |
@erohsik - please resolve branch conflicts |
Introduce a new type of Next hop group that allows the application to provide the list of next hops that are members of the Next hop group along with the list of weights. Signed-off-by: Kishore Gummadidala <[email protected]>
Introduce a new type of Next hop group that allows the application to provide the list of next hops that are members of the Next hop group along with the list of weights. Signed-off-by: Kishore Gummadidala <[email protected]>
Introduce a new type of Next hop group that allows the application to provide the list of next hops that are members of the Next hop group along with the list of weights. Signed-off-by: Kishore Gummadidala <[email protected]>
Introduce a new type of Next hop group that allows the application to provide the list of next hops that are members of the Next hop group along with the list of weights. Signed-off-by: Kishore Gummadidala <[email protected]>
4e0ba8c
to
2c99867
Compare
Done.. |