Skip to content
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

Fix VRF update handling for loopback interfaces in IntfsOrch #3461

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

ram25794
Copy link
Contributor

What I did

Addressed the scenario where an interface exists in m_syncdIntfses, but the incoming VRF does not match the updated VRF for the loopback interface. The solution involves updating the loopback’s VRF ID, decrementing the reference count for the old VRF, and incrementing the reference count for the new VRF

Why I did it

Sometimes DEL is missing in the orchagent as mentioned in the issue (#3339), leading to a scenario where, when a loopback interface is added to a non-default VRF, an ip2me route is incorrectly added to the default VRF. This issue occurs because the IntfsOrch is not handling the case where the interface exists in m_syncdIntfses, but the VRF does not match the updated VRF configuration.

How I verified it

Reproduced the issue with the fix applied and verified in the SAI Redis log that the ip2me route was correctly added to the non-default VRF

2025-01-07.20:48:12.797119|c|SAI_OBJECT_TYPE_ROUTE_ENTRY:{"dest":"8.8.8.8/32","switch_id":"oid:0x21000000000000","vr":"oid:0x3000000000427"}|SAI_ROUTE_ENTRY_ATTR_PACKET_ACTION=SAI_PACKET_ACTION_FORWARD|SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID=oid:0x1000000000001

Added Unit Tests

Details if related

@ram25794 ram25794 requested a review from prsunny as a code owner January 10, 2025 04:08
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

linux-foundation-easycla bot commented Jan 10, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ram25794 ram25794 marked this pull request as draft January 10, 2025 04:10
@dgsudharsan dgsudharsan marked this pull request as ready for review January 10, 2025 05:55
@prsunny prsunny merged commit 54a499b into sonic-net:master Jan 10, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants