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

Mixed big-endian and little-endian UDP test fails #1414

Closed
mriswyth opened this issue Nov 4, 2022 · 1 comment
Closed

Mixed big-endian and little-endian UDP test fails #1414

mriswyth opened this issue Nov 4, 2022 · 1 comment

Comments

@mriswyth
Copy link
Contributor

mriswyth commented Nov 4, 2022

  • Version of iperf3: 3.12

  • Hardware: x86_64 and MIPS 74Kc V5.0

  • Operating system (and distribution, if any): Linux for both systems

Bug Report

Mixing a big-endian and little-endian systems for the client and server results in UDP tests failing to start.

This is the failed output of an x86_64 PC client command running against a big-endian server

perf3 -c FE80::848D:84FF:FEFE:9165%eno1 -n 1 -u --debug --verbose
iperf 3.12
Linux bthompson.rajant.com 6.0.5-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 26 15:55:21 UTC 2022 x86_64
Control connection MSS 1428
Setting UDP block size to 1428
send_parameters:
{
        "udp":  true,
        "omit": 0,
        "time": 0,
        "num":  1,
        "blockcount":   0,
        "parallel":     1,
        "len":  1428,
        "bandwidth":    1048576,
        "pacing_timer": 1000,
        "client_version":       "3.12"
}
Time: Fri, 04 Nov 2022 17:42:46 UTC
Connecting to host FE80::848D:84FF:FEFE:9165%eno1, port 5201
      Cookie: oc7rjz2iw7yvlmrsxv2gpswowhlcamlqjdna
      Target Bitrate: 1048576
SNDBUF is 212992, expecting 0
RCVBUF is 212992, expecting 0
Setting application pacing to 131072
Sending Connect message to Socket 5
Connect received for Socket 5, sz=4, buf=36373839, i=0, max_len_wait_for_reply=4
iperf3: error - unable to read from stream socket: Invalid argument

This is the output of the same client running against a little-endian server

iperf3 -c FE80::D0:12FF:FE28:F3BD%eno1 -n 1 -u --debug --verbose
iperf 3.12
Linux bthompson.rajant.com 6.0.5-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 26 15:55:21 UTC 2022 x86_64
Control connection MSS 1428
Setting UDP block size to 1428
send_parameters:
{
        "udp":  true,
        "omit": 0,
        "time": 0,
        "num":  1,
        "blockcount":   0,
        "parallel":     1,
        "len":  1428,
        "bandwidth":    1048576,
        "pacing_timer": 1000,
        "client_version":       "3.12"
}
Time: Fri, 04 Nov 2022 17:45:06 UTC
Connecting to host FE80::D0:12FF:FE28:F3BD%eno1, port 5201
      Cookie: fqqbhjoeafb2lt355cvfsphpagt6nfeufoev
      Target Bitrate: 1048576
SNDBUF is 212992, expecting 0
RCVBUF is 212992, expecting 0
Setting application pacing to 131072
Sending Connect message to Socket 5
Connect received for Socket 5, sz=4, buf=39383736, i=0, max_len_wait_for_reply=4
[  5] local fe80::bf96:250b:5c8e:66f9 port 59907 connected to fe80::d0:12ff:fe28:f3bd port 5201
Starting Test: protocol: UDP, 1 streams, 1428 byte blocks, omitting 0 seconds, 1 bytes to send, tos 0
sent 1428 bytes of 1428, total 1428
send_results
{
        "cpu_util_total":       22.401289282836423,
        "cpu_util_user":        22.401289282836423,
        "cpu_util_system":      0,
        "sender_has_retransmits":       0,
        "streams":      [{
                        "id":   1,
                        "bytes":        1428,
                        "retransmits":  18446744073709551615,
                        "jitter":       0,
                        "errors":       0,
                        "packets":      1,
                        "start_time":   0,
                        "end_time":     0.000109
                }]
}
get_results
{
        "cpu_util_total":       26.626425217974514,
        "cpu_util_user":        0,
        "cpu_util_system":      26.626425217974514,
        "sender_has_retransmits":       1.8446744073709552e+19,
        "streams":      [{
                        "id":   1,
                        "bytes":        0,
                        "retransmits":  1.8446744073709552e+19,
                        "jitter":       0,
                        "errors":       0,
                        "packets":      0,
                        "start_time":   0,
                        "end_time":     0.001297
                }]
}
interval_len 0.000109 bytes_transferred 1428
interval forces keep
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-0.00   sec  1.39 KBytes   105 Mbits/sec  1  
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-0.00   sec  1.39 KBytes   105 Mbits/sec  0.000 ms  0/1 (0%)  sender
[  5]   0.00-0.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)  receiver
CPU Utilization: local/sender 22.4% (22.4%u/0.0%s), remote/receiver 26.6% (0.0%u/26.6%s)

iperf Done.
  • Expected Behavior
    UDP test runs successfully.

  • Actual Behavior
    UDP test fails to run.

  • Steps to Reproduce
    iperf3 -c <other-endian system> -u

  • Possible Solution
    Have the UDP client connection recognize either value as a response message.

@bmah888
Copy link
Contributor

bmah888 commented Dec 7, 2023

Fixed with PR #1468.

@bmah888 bmah888 closed this as completed Dec 7, 2023
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 a pull request may close this issue.

2 participants