Closed bmah888 closed 10 years ago
From kridgway@harris.com on July 21, 2011 12:07:53
Update the code as shown under issue 36 and recompile. This problem will go away! Keith
From busylee on July 22, 2011 02:40:10
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...
From eduade.2001 on May 22, 2011 22:43:49
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.
Attachment: error.png
Original issue: http://code.google.com/p/iperf/issues/detail?id=41