Incorrect single out-of-order report?
Hello,
When running Iperf V. 2.0.2 very often a "1 datagrams received out-of-order" per
flow can be noticed. After printing some variables, a.o. the "packet_ID" I got
the impression that this out-of-order message is a bug in the client for the
following reason:
In "iperf-2.0.2/src/Client.cpp". The report is closed after the sending at
line 240:
CloseReport( mSettings->reporthdr, reportstruct );
Hereafter, a final UDP datagram is send with the last packet ID preceded with a
minus sign at line 249:
mBuf_UDP->id = htonl( -(reportstruct->packetID) );
But "reportstruct->packetID" does not necessary contain the last packet ID send
because in "CloseReport()" specified in "iperf-2.0.2/src/Reporter.c" there is
set in line 380:
packet->packetID = agent->report.cntDatagrams
and "agent->report.cntDatagrams" might be smaller than the last packet ID send
because not yet all datagrams are reported. This results in the sending of a
final, negative packet ID which is absolute smaller / equal than the last
regular ID send which results on its term in a out-of-order message.
When I store the value of "packet->packetID" before the "CloseReport()":
max_packet_id = reportstruct->packetID;
and use that value for the final datagram:
mBuf_UDP->id = htonl( -max_packet_id );
than it seems to work fine now in first instance. However, I have not yet
tested it enough to check if there are still any side effects.
Kind regards,
Hans