This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Slow, slow , slow TCPNet ...

Hi,

I'm using a MCB2368 board with both RTX and TCP Net over ethernet.
I have a single tcp task that manages all my socket.

The other task is a FTP server connected to a SD memory card and communicates through mailbox and events mith the main tcp.

My chins dropped away (is it the good expression ? ) when I saw the speed : 6KB/s ....

Ok , so I removed the sd card reading and I had something like that when sending data over my socket :

sdbuf=_alloc_box(sdcardpool); //a dynamic allocated block

memset(sdbuf,1,1400); // fill the block with 0x01

// Send quite filled TCP frame 20times (20*1400=28000 bytes)
for (i=0;got<20;got++)
{
        SendFtpData(sdbuf,1400);
}

In SendFtpData() , I allocate the tcp buffer , send the frame, and wait for a ACK event from the main tcp task :

void SendFtpData(U8 *buf,U16 len)
{
        TcpFrame *frame;

        frame=_alloc_box (mpool);

        os_mut_wait(mutex_getbuf,0xFFFF);
        frame->message=tcp_get_buf(len);
        os_mut_release(mutex_getbuf);
        memcpy(frame->message,buf,len);
        frame->length=len;
        os_mbx_send(mailbox3,&frame,0xFFFF);
        os_evt_wait_or(EVT_FTP_DATA_ACK,0xFFFF);
        _free_box(mpool,frame);
}

So , with a simple memory block filled and sent 20 times I get only 6.3 KB/s ... So I can say that it's not the FAT/SD card stack that is slow.

In this case why Tcpnet is so slow ?
Is it possible to manage blocks of data and not each tcp frame ?

Thanks in advance.

Parents Reply Children
No data