sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

[Orchagent] Recursive nexthop group enhancement

Open utpalkantpintoo opened this issue 10 months ago • 4 comments

What I did

Implemented recursive nexthop group enhancement in Orchagent (NhgOrch). They have been proposed in: https://github.com/sonic-net/SONiC/pull/1636

Why I did it

These changes are required to handle a new field - "nexthop_group" in the App DB NEXT_HOP_GROUP_TABLE. Such nexthop groups are called recursive nexthop groups. This field contains the list of member (singleton) nexthop groups. Such recursive nexthop groups are represented by NEXT_HOP_GROUP objects.

How I verified it

Details if related

utpalkantpintoo avatar Apr 07 '24 09:04 utpalkantpintoo

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: utpalkantpintoo / name: Utpal (ff2112ef11b13486ea2b02acf28d924f4f851c7e, 3ae044af5b3dad70031c9fe629423677e0a7bc03, 6776a5f44fcdd5f8c677fb35f3c46c22dd6f58e6, 0788fc1470a5a95059bfc2238071900be3c5ac72, fe7f488b1988cdc87d392dc149dddd9fbeaf0e37)

/azpw run Azure.sonic-swss

utpalkantpintoo avatar May 02 '24 09:05 utpalkantpintoo

/AzurePipelines run Azure.sonic-swss

mssonicbld avatar May 02 '24 09:05 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 02 '24 09:05 azure-pipelines[bot]

@venkatmahalingam @Gokulnath-Raja pls signoff if you have no further comments

adyeung avatar May 16 '24 16:05 adyeung

Besides, there might be two issues that:

  1. If a route points to a singleton NEXTHOP_GROUP and it becomes non-singleton later, the route will still refer to the SAI ID of the NEXTHOP instead of the newly created NEXTHOP_GROUP
  2. For recursive situations, how to update NEXTHOP_GROUP recursively? For example, NEXTHOP_GROUP_TABLE:ID1 points to ID2 & ID3, ID2 refers to NEXTHOP NHa & NHb. When ID2 is updated to refer to NHa, NHb & NHc, how can we add member NHc to NEXTHOP_GROUP_TABLE:ID1 simultaneously?

goomadao avatar May 24 '24 08:05 goomadao

Hi @goomadao

Thanks for the comments. Please find below my response:

  1. For any nexthop-group update which changes its SAI-ID, it is expected that the routing app update the associated routes as well. This is expected behavior with FRR. Handling it in Orchagent (NhgOrch/RouteOrch) will require maintaining a nexthop-group to route entries data-structure.

  2. With recursive nexthop-group scheme, it is expected that the routing app resolve the recursive nexthop-groups and provide a recursive nexthop-group with ultimate nexthop member(s) which are not recursive themselves. This is expected behavior with FRR.

utpalkantpintoo avatar May 29 '24 09:05 utpalkantpintoo

@utpalkantpintoo Thanks for your explanation. You're right, I missed that there is an upper application where the update could be triggered.

Could you please take a look at the pending review I raised before? I still can't figure out any situation to get into those two conditions.

goomadao avatar Jun 06 '24 07:06 goomadao