Support parallel UDP streams under Windows and Cygwin
-
Version of iperf3 (or development branch, such as
masteror3.1-STABLE) to which this pull request applies: 3.10 -
Issues fixed (if any): #472 / #1161
-
Brief description of code changes (suitable for use as a commit message):
Suggested change to allow UDP parallel streams under Windows (and Cygwin). The change is based on the approach suggested by @rossro, as described in this #472 comment.
The change adds an option to the Windows Server's -p parameter that defines the number of ports available starting with the defined port :
-p <port>/[<num of ports]
E.g -p 5201/2 specifies that ports 5201 and 5202 can be used for the UDP streams.
UPDATE (16-Apr-2023):
Updated to be fully backward compatible, including between Windows and other OS (including rebase to 3.13). This is by adding a UDP_CONNECT_REPLY_NEXT_PORT from a Windows server, to indicate that a different port should be used for the next UDP stream. The only combination that does not work is a Windows Server with older client version when multi UDP streams are used. However, this did not work anyway (just the error condition is changed).
If the merge conflicts are resolved, is there something preventing this from merging otherwise?
I would love to use iperf to test bidirectional udp on windows and this would allow for that, in theory.
If the merge conflicts are resolved, is there something preventing this from merging otherwise?
I would love to use iperf to test bidirectional udp on windows and this would allow for that, in theory.
As Windows is not officially supported by iperf3, I don't know if and when the iperf3 team will merge this PR. In any case, I have rebased the changes to the latest iperf3 master branch (3.19.1+), including conflicts resolution, so you may build from this branch.