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

Remove RIF from m_rifsToAdd before deleting it

Open tshalvi opened this issue 1 year ago • 4 comments

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 avatar Oct 21 '24 07:10 tshalvi

/azpw run

tshalvi avatar Oct 21 '24 09:10 tshalvi

/AzurePipelines run

mssonicbld avatar Oct 21 '24 09:10 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 21 '24 09:10 azure-pipelines[bot]

@tshalvi , possible to add unit test?

prsunny avatar Oct 21 '24 18:10 prsunny

any further request or this can be merged?

liat-grozovik avatar Dec 03 '24 17:12 liat-grozovik

/azpw run

tshalvi avatar Dec 05 '24 09:12 tshalvi

/AzurePipelines run

mssonicbld avatar Dec 05 '24 09:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 05 '24 09:12 azure-pipelines[bot]

/azpw run

tshalvi avatar Dec 09 '24 18:12 tshalvi

/AzurePipelines run

mssonicbld avatar Dec 09 '24 18:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 09 '24 18:12 azure-pipelines[bot]

/azpw run

tshalvi avatar Dec 12 '24 07:12 tshalvi

/AzurePipelines run

mssonicbld avatar Dec 12 '24 07:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 12 '24 07:12 azure-pipelines[bot]

/azp run

mssonicbld avatar Dec 24 '24 10:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 24 '24 10:12 azure-pipelines[bot]

/azpw run

tshalvi avatar Jan 22 '25 13:01 tshalvi

/AzurePipelines run

mssonicbld avatar Jan 22 '25 13:01 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jan 22 '25 13:01 azure-pipelines[bot]

/azp run

mssonicbld avatar Jan 24 '25 05:01 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jan 24 '25 05:01 azure-pipelines[bot]

/azpw run

tshalvi avatar Jan 27 '25 11:01 tshalvi

/AzurePipelines run

mssonicbld avatar Jan 27 '25 11:01 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jan 27 '25 11:01 azure-pipelines[bot]

/azpw run

tshalvi avatar Jan 27 '25 19:01 tshalvi

/AzurePipelines run

mssonicbld avatar Jan 27 '25 19:01 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jan 27 '25 19:01 azure-pipelines[bot]

/azpw run

tshalvi avatar Jan 29 '25 19:01 tshalvi

/AzurePipelines run

mssonicbld avatar Jan 29 '25 19:01 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jan 29 '25 19:01 azure-pipelines[bot]