mahyuddin / iperf

Automatically exported from code.google.com/p/iperf
Other
0 stars 0 forks source link

multiple UDP testing causes connection refused #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.server execute command - iperf3 -u -s -i 1
2.client execute command - iperf3 -c ip_address -u 
3.re-running command - iperf3 -c ip_address -u after previous execution on 
client causes error "Unable to read from stream socket : Connection refused

What is the expected output? What do you see instead?

should provide output for latency and loss on UDP tests

What version of the product are you using? On what operating system?

Ubuntu server version 11 64bit

Please provide any additional information below.

Original issue reported on code.google.com by eduade.2...@gmail.com on 23 May 2011 at 5:43

Attachments:

GoogleCodeExporter commented 9 years ago
Update the code as shown under issue 36 and recompile. This problem will go 
away!
Keith

Original comment by kridg...@harris.com on 21 Jul 2011 at 7:07

GoogleCodeExporter commented 9 years ago
Hi, I'm Jackie who joined a few days ago.
Once you see a source code, you can understand why it works just one time in 
case of UDP testing.
Speaking of the code level, let's see the ipfer_run() in main.c.

After completion of 'iperf_run_server(test)' data struction of "test" is reset 
by  'iperf_reset_test(test)'.

127 int
128 iperf_run(struct iperf_test * test)
129 {
130     switch (test->role) {
131         case 's':
132             for (;;) {
133                 if (iperf_run_server(test) < 0) {
134                     iperf_error("error");
135                     printf("\n");
136                 }
137                 iperf_reset_test(test);
138             }
     (snipped)

BTW, One of iperf_reset_test() routine is always set protocol to the "TCP".
Hence you can fix the code as follows,

1141 #if DEBUG /* busylee */
1142     printf("####[%s:%d]protocol:%s\n", __FUNCTION__, __LINE__, 
test->protocol->name);
1143 #endif
1144     if (test->protocol->id == Ptcp) {
1145             set_protocol(test, Ptcp);
1146     } else if (test->protocol->id == Pudp) {
1147             set_protocol(test, Pudp);
1148     }

Take care...

Original comment by busy...@gmail.com on 22 Jul 2011 at 9:40

GoogleCodeExporter commented 9 years ago
I can confirm that the fix referenced in issue 36 comment 3 resolve this 
problem for me beta 4.

Original comment by mil...@gmail.com on 9 Feb 2012 at 12:36

GoogleCodeExporter commented 9 years ago
fixed

Original comment by bltier...@gmail.com on 7 Sep 2012 at 3:58