iperf
iperf copied to clipboard
Add sendmmsg support for UDP
-
Version of iperf3 (or development branch, such as
masteror3.1-STABLE) to which this pull request applies: 3.10.1 latest master -
Issues fixed (if any): #873
-
Brief description of code changes (suitable for use as a commit message):
Add sendmmsg support for sending UDP messages for enhanced throughput.
sendmmsg is used by setting the -Z option (which is currently used only for TCP), as it is regarded as the UDP's alternative to TCP's zero copy.
The number of packets that are send by each call to sendmmsg is the burst size set by the -b option.
Note:
configure.acwas changed so runningbootstrap.sh; configureis required for the changes to take effect. (New defines areHAVE_SENDMMSG,HAVE_RECVMMSGandHAVE-SEND_RECVMMSG.)recvmmsgis not used because tests showed does not help the throughput and event may hart it. However, the changes for testingrecvmmsgare commented out iniperf_udp_recv()and not removed in case further evaluation is desired. If this is not the case, then all changes tpiperf_udp_recvcan be removed.
@bmah888 I have change the PR to use -Z option for using sendmmsg for UDP, instead of adding a new option (I also rewrote the PR description). I also enhanced implementation, so if -Z is not used for UDP, practically there should not be any change to the current iperf3 behavior. Therefore the risk of adding these changes is low.
The UDP throughput enhancement achieved for high throughput interfaces is quite substantial, especially when the UDP messages are not large (witch is usually the case).
@bmah888 Any plan to have this PR reviewed and merged?