You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[portsorch] fix PortsOrch::allPortsReady() returns true when it should not (sonic-net#1103)
* [portsorch] fix PortsOrch::allPortsReady() returns true when it should not
Warm start flow before the change:
1st iteration:
- BufferOrch::doTask(): returns since PortInitDone hasn't arived yet
- PortsOrch::doTask(): processes all PORT_TABLE untill PortInitDone flag
m_pendingPortSet is empty yet and m_portInitDone is true
so allPortsReady() will return true
- AnyOrch::doTask(): check g_portsOrch->allPortsRead()
2nd iteration:
- BufferOrch::doTask(): now buffers are applied
This causes BufferOrch override PfcWdOrch's zero-buffer profile.
The change swaps BufferOrch and PortsOrch in m_orchList, because 1st
BufferOrch iteration will always skip processing and eliminates possibility
of having m_pendingPortSet not filled with ports after m_initDone is set to true.
* remove extra newline
* [pfcwdorch] fix PfcWdSwOrch::doTask() starts WD action when WD wasn't started in warm boot
It appeared that pfc watchdog relied on a buggy behaviour of PortsOrch::allPortsReady().
In fixed PortsOrch::allPortsReady() you'll see that watchdog action is trying to start
before watchdog was started, because allPortsReady() in PfcWdOrch::doTask() returned false.
Before the fix watchdog was started before, because allPortsReady() lied that ports are ready
when they were not.
* [portsorch] populate m_pendingPortSet in PortsOrch::bake()
* [portsorch] optimize to 3 iterations instead of 4
* Revert "[portsorch] optimize to 3 iterations instead of 4"
* revert change of order in m_orchList
* [mock_tests] fix tests build
* [mock_test] create unittest for PortsOrch::allPortsReady cold/warm flows
* [orchdaemon] fix removed sfloworch
* [mock_tests] make mock_tests run on "make check"
0 commit comments