Commit 685075e
authored
Remove RIF from m_rifsToAdd before deleting it (sonic-net#3336)
* Remove RIF from m_rifsToAdd before deleting RIF
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:
Create an object and add it to a list upon receiving an APP_DB update.
Start counter polling for all objects in the list during the timer event.
Stop counter polling for an object.
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 now1 parent 4b8cad4 commit 685075e
1 file changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | | - | |
1333 | | - | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1334 | 1347 | | |
1335 | 1348 | | |
1336 | 1349 | | |
| |||
1759 | 1772 | | |
1760 | 1773 | | |
1761 | 1774 | | |
1762 | | - | |
| 1775 | + | |
| 1776 | + | |
0 commit comments