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

Remove RIF from m_rifsToAdd before deleting it #3336

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

tshalvi
Copy link
Contributor

@tshalvi tshalvi commented Oct 21, 2024

What I did
I extended the RIF removal functionality to also remove the port from the m_rifsToAdd list.

Why I did it
Typically, the counter and object handling logic follows a strict sequence:

Create an object, then start counter polling.
Stop counter polling, then remove the object.
However, there is deferred logic for RIF counters, where counter polling starts based on a timer rather than immediately.

This process generally works as follows:

  1. Create an object and add it to a list upon receiving an APP_DB update.
  2. Start counter polling for all objects in the list during the timer event.
  3. Stop counter polling for an object.
  4. Remove the object.

If RIF creation and removal occur frequently, removal can happen before the timer event. As a result, the timer may start counter polling for an object that has just been removed, causing the following error message:
ERR syncd#SDK: :- processFlexCounterEvent: port VID oid:0x600000000099d, was not found (probably port was removed/splitted) and will remove from counters now

How I verified it
Tested in regression.

Details if related

@tshalvi tshalvi requested a review from prsunny as a code owner October 21, 2024 07:45
@tshalvi
Copy link
Contributor Author

tshalvi commented Oct 21, 2024

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny requested a review from dgsudharsan October 21, 2024 18:05
@prsunny
Copy link
Collaborator

prsunny commented Oct 21, 2024

@tshalvi , possible to add unit test?

@liat-grozovik
Copy link
Collaborator

any further request or this can be merged?

@tshalvi
Copy link
Contributor Author

tshalvi commented Dec 5, 2024

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tshalvi
Copy link
Contributor Author

tshalvi commented Dec 9, 2024

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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