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

Error in protocol details on wiki #1737

Open
azonenberg opened this issue Jul 23, 2024 · 2 comments
Open

Error in protocol details on wiki #1737

azonenberg opened this issue Jul 23, 2024 · 2 comments

Comments

@azonenberg
Copy link

azonenberg commented Jul 23, 2024

The protocol information on the wiki https://github.com/esnet/iperf/wiki/IperfProtocolStates is incorrect. It states "There is also a mini protocol for each stream: on initial connection, the client sends the test's 37-byte cookie. After that, the stream just gets uninterpreted data.".

In UDP mode at least (haven't looked at TCP), looking at iperf_udp.c:90, it seems the actual packet protocol is:

uint32 time_sec
uint32 time_usec
uint64 sequence
(padded out with random/ignored data after this)

I also see no evidence of the cookie being sent in any of these packets.

@azonenberg
Copy link
Author

Actually it seems the sequence number is sometimes 32 bit, i'm not clear on how it determines which code path to use.

@davidBar-On
Copy link
Contributor

I also see no evidence of the cookie being sent in any of these packets.

I believe you are right that the cookie is send on stream creation only for TCP and SCTP, but not for UDP. I see that the blog was last updated in 2014, so I wonder if it is still maintained.

Actually it seems the sequence number is sometimes 32 bit, i'm not clear on how it determines which code path to use.

As you found, the UDP packets start with an header that includes seconds, micro-seconds, packet-number. Seconds and micro-seconds are 32 bits are the sending time and are used for calculating the jitter.

The packet-number size is set per test and can be either 32 (default) or 64 bits if the --udp-counters-64bit option is set. It allows to detect packets that were not received or packets that are received not in order, mainly for calculating the "lost datagrams" statistic.

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

No branches or pull requests

2 participants