Prevent Topology Failures When A System Has Multiple Salinity Sensors #369
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.
What changed?
Updates the LWIP task priority to 7 to allow LWIP to preempt low priority tasks and prevent blocking of receiving/transmitting data on the Bristlemouth network.
How does it make Bristlemouth better?
A bug was noticed on the Bristlemouth network that occurred when multiple salinity sensors were on a single network.
This bug did not allow the first topology request to succeed on a system.
The bug boiled down to the following
forloop inaanderaa_conductivity.cpp:This loop was preventing the
lwip_threadfrom running.The following is the state of the tasks before the
forloop (rows from left to right representtask name,task state,task priority,task stack size,task number):And here are the tasks after:
The
tcpip_threadwith priorityis in the run stateRafter the loop but cannot run until theUSERtask (currently executing) is placed in a blocking (B`) state.Upping the priority of the
tcpip_threadimmediately fixes this issue.This might also help the throughput/robustness of the system.
With a low priority
tcpip_threadingested data packets might have gotten dropped if they could not have been handled in a timely matter!Where should reviewers focus?
The description above.
Checklist