[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] loading the stack ...
From: |
Teratux |
Subject: |
[lwip-users] loading the stack ... |
Date: |
Thu, 10 Jun 2010 15:59:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 |
Hi ... I'm using a port of the lwip stack on the FreeRtos operating
system. I'm trying to create a gateway between an ethernet interface
and a serial port on a ARM based board. Here's a snippet of what I'm
trying to use based on the examples. I ommited a few portions and
focused on the main issue.
struct netconn *pNewConnection;
struct netconn *pListener;
pListener = netconn_new( NETCONN_TCP );
netconn_bind(pListener, NULL, RC_PORT );
netconn_listen( pListener );
int n = 0;
pNewConnection = netconn_accept(pListener);
while ( ( in = netconn_recv(pNewConnection) ) != NULL )
{
if ( in != NULL )
{
netbuf_data(in, (void*)&pBuff, &len);
i = 0;
while( i < len )
{
xQueueSend( handleUpr, (void*)&pBuff[i++], 10 );
vParTestToggleLED(3);
}
netbuf_delete(in);
}
}
This code starts a netconn_recv loop receiving data from a
pNewConnection and sending the data on to a queue provided in the
FreeRtos to another task. On the other end, I start a client with a
loop sending data over ethernet. My idea is to try to stress the
application.
The result of this is that, as time passes, the operating system starts
to block in the netconn_recv line waiting for data while I'm overloading
on the other end. I checked and the problem doesn't reside on the
ethernet end, the problem is only solved when I restart my application
and thus the lwip stack for another run, until some time passes ( maybe
1 or 2 minutes ) before it starts to block and unblock, each block
period increasing as time passes.
Can anyone help ??
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] loading the stack ...,
Teratux <=