-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zperf: Fix and improvements #1485
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krish2718
force-pushed
the
zperf_fixes
branch
from
February 8, 2024 16:55
e8cd5ab
to
ba82c4d
Compare
sachinthegreen
approved these changes
Feb 9, 2024
jukkar
approved these changes
Feb 9, 2024
rlubos
approved these changes
Feb 9, 2024
krga2022
approved these changes
Feb 9, 2024
Use socket services API for TCP receiver. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no> (cherry picked from commit 07823f7)
Use socket services API for UDP receiver. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no> (cherry picked from commit 1e8cbd5)
…ps and bps The ratio between mbps and kbps, kbps and bps should be 1000, instead of 1024, as common sense. The wrong ratio will decrease the Zperf throughput result. Signed-off-by: Fengming Ye <frank.ye@nxp.com> (cherry picked from commit f61a0cb)
This commit fixes restarting of UDP receiver service, along with some other minor cleanups: * The core issue was udp_server_running flag not being cleared when service was stopped. Fix this by introducing udp_receiver_cleanup() which does all of the required cleanups when receiver service is stopped. The function is called either when the application stopped the service with zperf_udp_download_stop(), or when the service was stopped due to error. * net_socket_service_unregister() was not called on zperf_udp_download_stop(), but only from the service callback - that would not work in case there's no active communication. * at the same time, net_socket_service_unregister() would be called from the service callback in case of errors. Fix this, by making udp_recv_data() only return an error, and let the service callback to do the cleanup. * Remove no longer used udp_server_run semaphore * Remove udp_server_stop - with socket services it seems no longer needed. * zperf_udp_receiver_init() now returns an error, so that we don't mark the service as running in case of socket/services error. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no> (cherry picked from commit 139bc4e)
The issues found for UDP receiver were also identified for TCP receiver, this commit applies practically the same set of changes as in case of UDP. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no> (cherry picked from commit 4ce0352)
In case zperf session was aborted by the user (by for instance stopping it from shell), or practically in case of any other communication-related error, the zperf session could end up in a state other than NULL or COMPLETED, with no way to recover. This made the session no longer usable and eventually could lead to zperf being not able to start a new session anymore. Fix this by introducing zperf_session_reset() function, which resets the session state back to defaults. The function is called when the zperf receiver service is stopped. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no> (cherry picked from commit 68bc981)
krish2718
force-pushed
the
zperf_fixes
branch
from
February 15, 2024 13:42
ba82c4d
to
61eadca
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.