AnsweredAssumed Answered

Mysterious netio result between Release and Debug mode on 52259Demo

Question asked by Yu ChangKyu on Sep 15, 2009
Latest reply on Sep 20, 2009 by Yu ChangKyu

I'm testing the TCP/IP performance on 52259Demo board using RTCS. And connect the PC and
52259 Demo board using a switching hub. Demo board is programmed netio and start
using DHCP client(192.168.0.8).

I execute the netio program twice in PC. The first one is the result in release mode compiled and the last one is in debug mode compiled (refer next captured text).

 

==============Command Prompt screen ========================= 

D:\Ckyu\E2S\FW\NetIO\netio126\bin>win32-i386.exe -t 192.168.0.8

 

NETIO - Network Throughput Benchmark, Version 1.26

(C) 1997-2005 Kai Uwe Rommel

 

TCP connection established.

Packet size  1k bytes:  2161 KByte/s Tx,  25214 Byte/s Rx.

Packet size  2k bytes:  1211 KByte/s Tx,  29990 Byte/s Rx.

Packet size  4k bytes:  2281 KByte/s Tx,  20855 Byte/s Rx.

Packet size  8k bytes:  3676 KByte/s Tx,  20855 Byte/s Rx.

Packet size 16k bytes:  3971 KByte/s Tx,  55053 Byte/s Rx.

Packet size 32k bytes:

D:\Ckyu\E2S\FW\NetIO\netio126\bin>win32-i386.exe -t 192.168.0.8

 

NETIO - Network Throughput Benchmark, Version 1.26

(C) 1997-2005 Kai Uwe Rommel

 

D:\Ckyu\E2S\FW\NetIO\netio126\bin>win32-i386.exe -t 192.168.0.8

 

NETIO - Network Throughput Benchmark, Version 1.26

(C) 1997-2005 Kai Uwe Rommel

 

TCP connection established.

Packet size  1k bytes:  578 KByte/s Tx,  24827 Byte/s Rx.

Packet size  2k bytes:  811 KByte/s Tx,  588 KByte/s Rx.

Packet size  4k bytes:  964 KByte/s Tx,  628 KByte/s Rx.

Packet size  8k bytes:  2308 KByte/s Tx,  663 KByte/s Rx.

Packet size 16k bytes:  1809 KByte/s Tx,  1167 KByte/s Rx.

Packet size 32k bytes:

D:\Ckyu\E2S\FW\NetIO\netio126\bin> 

========================================================== 



 

At that time in demo board, send() functions always returns 0, except only at first one time.

And it have no relation release or debug mode. 

If packet size is 1k bytes then I saw the message "Send:1024".

Next image is captured for send() funcation's fail situation at the end of above simulation.


============Hyper-Term screen =============================== 

Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384

Receiving from client, packet size 32k ...

========================================================== 

 

Above message comes from next source.



             else if (ctl.cmd == CMD_S2C)

             {

                           printf("\nSending to client, packet size %s ... ", PacketSize(ctl.data));

                           cBuffer[0] = 0;

                           nData = 0;

                           send_time =RTCS_time_get() + SEND_TIMEOUT;

                           while(RTCS_time_get() < send_time)

                           {

                                        for (nByte = 0; nByte < ctl.data; )

                                        {

                                                     rc = send(client, cBuffer + nByte, ctl.data - nByte, 0);

                                                     if (rc < 0 )

                                                     {

                                                                  puts("netio:send() failed");

                                                                  break;

                                                     }

                                                     if (rc > 0)

                                                                  nByte += rc;

 

                                                     printf("Send : %d\n", nByte);

                                        }

                                        nData += ctl.data;

                           }

                           cBuffer[0] = 1;

                           if (send_data(client, cBuffer, ctl.data, 0))

                                        break;

             }

             else /* quit */

                           break;




My question is

  1)      Why Debug mode Tx bytes is larger than that of release mode in Demo board?

  2)      Why send() returns 0 always, except for the first time.

 

Regards. 

Message Edited by bamtti on 2009-09-15 03:37 PM

Outcomes