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

[flowcounterrouter] Fix the route remove flow for non-yet bound prefixes #2691

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

vivekrnv
Copy link
Contributor

@vivekrnv vivekrnv commented Mar 7, 2023

What I did

Update the isRouteAlreadyBound to consider both the maps for verifying whether the prefix is deleted or not.

Why I did it

  • When a route is deleted and the flow counter for that route is not yet bound i.e. still in mPendingAddToFlexCntr (in rare cases), the orchagent will not delete the flow counters and they will remain even after the corresponding route is deleted

  • Happens because isRouteAlreadyBound method presumes all the route counters for a route pattern would either be in mPendingAddToFlexCntr or mBoundRouteCounters. But in some cases they might exist in both the maps

How I verified it

Details if related

@vivekrnv vivekrnv marked this pull request as ready for review March 7, 2023 06:48
@vivekrnv vivekrnv requested a review from prsunny as a code owner March 7, 2023 06:48
@vivekrnv vivekrnv requested review from Junchao-Mellanox and prsunny and removed request for prsunny March 7, 2023 06:48
@liat-grozovik
Copy link
Collaborator

@vivekrnv on which branches this fix should be backport?

@vivekrnv
Copy link
Contributor Author

vivekrnv commented Mar 7, 2023

@vivekrnv on which branches this fix should be backport?

Request for 202211 and 202205

@prsunny prsunny merged commit a2bd92f into sonic-net:master Mar 14, 2023
yxieca pushed a commit that referenced this pull request Mar 15, 2023
…2691)

*Update the isRouteAlreadyBound to consider both the maps for verifying whether the prefix is deleted or not.
StormLiangMS pushed a commit that referenced this pull request Mar 19, 2023
…2691)

*Update the isRouteAlreadyBound to consider both the maps for verifying whether the prefix is deleted or not.
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.

7 participants