Skip to content
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

Wrong test in function prvTCPSendLoop() #1043

Merged

Conversation

htibosch
Copy link
Contributor

Description

Thanks to a forum user zugo83 in a post in the FreeRTOS Forum, we saw that the function FreeRTOS_send() would last longer than necessary.

The proposed change is as follows:

     xBytesLeft -= xByteCount;
     xBytesSent += xByteCount;
 
-    if( ( xBytesLeft == 0 ) && ( pvBuffer == NULL ) )
+    if( ( xBytesLeft == 0 ) || ( pvBuffer == NULL ) )
     {
         /* pvBuffer can be NULL in case TCP zero-copy transmissions are used. */
         break;
     }

This must have been a type that happened when we merged the trees IPv4 with IPv6/multi.

Test Steps

Try send loads of data before and after this change.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@htibosch htibosch requested a review from a team as a code owner November 12, 2023 16:28
@htibosch
Copy link
Contributor Author

PS. I found the guilty PR: #317, mea culpa.

ActoryOu
ActoryOu previously approved these changes Nov 13, 2023
moninom1
moninom1 previously approved these changes Nov 13, 2023
tony-josi-aws
tony-josi-aws previously approved these changes Nov 13, 2023
aggarg
aggarg previously approved these changes Nov 14, 2023
@amazonKamath
Copy link
Member

Would be good to run iperf before merge

@tony-josi-aws tony-josi-aws dismissed stale reviews from aggarg, moninom1, ActoryOu, and themself via b652f75 November 14, 2023 10:53
@tony-josi-aws tony-josi-aws merged commit c263e33 into FreeRTOS:main Nov 14, 2023
@htibosch htibosch deleted the wrong_test_in_function_prvTCPSendLoop branch November 21, 2023 06:27
htibosch added a commit to htibosch/FreeRTOS-Plus-TCP that referenced this pull request Nov 21, 2023
Wrong test in function prvTCPSendLoop() (FreeRTOS#1043)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants