[SL-TEMP] Increasing the lwip thread priority to 32 (osPriorityAboveNormal) #312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing
After the move to the cmsis os the lwip priority was still 2 i.e., below the application (osPriorityNormal)
Increasing the lwip task priority to 32
Current task priorities list is as follows:
Timer SVC - 55 (Highest)
si91x_event - 49 : Handles the notifications event coming from the wifi sdk itself
si91x_bus - 48 : Handles the Tx and Rx events coming from the wifi sdk itself
rsi_ble - 40 : Matter platform layer for the ble events, this internalls calls APIs from the wifi sdk and vice versa
wlan_rsi - 39 : Matter platform layer for the wlan events, this internalls calls APIs from the wifi sdk and vice versa
LIT - 24 : Application thread
Shell - 16 : Matter CLI
UART - 16 : Logging
LWIP - 2 : Lwip packet handling low level input and output handling
CHIP - 2 : Matter thread common for all the platforms. Handling the data model read and writes. Provided by chip stack itself.
IDLE - 0
After discussing with the wifi sdk team it was suggested to keep the priority more than the application, there can be possibility that the lwip is blocked by the application thread if throughtput is more and your application is processing multiple events simulateously.
I have increased the priority to 32 and have validated commissioning and commands are working fine.
Currently since we don't get many events on the application thread like btn and all which is not affecting it but it can affect in the future when the application is more events blocking lwip.
Testing
Tested with 917 SoC and Wf200 RCP
Multiple commissioning runs and commands transfer.
Note:
This is a temporary change for Matter 1.4, the CSA code have chip task of priority osPriorityHigh so it should be analyzed and all the other tasks should also be modified.