Add ipconfigIP_TASK_AFFINITY #1288
Merged
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.
Add ipconfigIP_TASK_AFFINITY
Description
I have been testing using the TCP library with SMP freertos kernel. Unfortunately, the TCP library and / or the zync port that I am using do not function properly without some restrictions on concurrent code execution.
This page has good information on freertos SMP https://freertos.org/Documentation/02-Kernel/02-Kernel-features/13-Symmetric-multiprocessing-introduction
The first restriction that I used was the kernel option
configRUN_MULTIPLE_PRIORITIESset to 0. I have tested that for several weeks now and seems to be working well.The next step of testing that I am doing to prevent concurrent execution is to set
configRUN_MULTIPLE_PRIORITIESset to 1 and use the task affinity of all the tasks that use tcp functions to only allow them to run on one core. For my project, I am setting all these tasks:So it was necessary for me to modify the tcp library and the zynq port to allow setting the task affinity. This PR is adding the configuration option
ipconfigIP_TASK_AFFINITY.Test Steps
I have hardware set up for continuous network testing for a week now. My network testing has been continuously sending and checking echo data mixed with other application specific messages.
I don't think the unit tests can cover the new function calls because
xTaskCreateAffinitySetandxTaskCreateStaticAffinitySetrequire SMP kernel, which I don't believe is possible with the linux or windows ports yet.Checklist:
Related Issue
#1287
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.