[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Handling of many small packages?

From: TJO
Subject: [lwip-users] Handling of many small packages?
Date: Thu, 11 Sep 2014 06:54:40 -0700 (MST)


I use the tcpecho sample with FreeRTOS for EA dev kit.
I have re-written it so it makes connection to server, instead of listen.

>From the server i send 14 bytes in a packet
Then it sends 512 bytes in a packet.

Every time the tcpecho sample receives a message it returns 14 bytes

But if I send the 512 bytes in 128 bytes chunks (4x stream.Write(byEthRaw,
0, 128) ) from the server, it is just matter of time before it begins
generate a lot of retrans on my network and ultimate stop working.
According to the debugger the application still runs, but can't ping the
lwip and no data is send on the network. The debug output from lwip also

It seems it runs out for allocation space for pbufs.
The demo runs in internal PIRAM, so not a lot of space here. But I do not
generate that much traffic either.

If I don't send data back from the demo app it runs for ever!

I also have enabled filtering en the EMAC, so I don't get all the brodcasts
on the network.

Any suggestions what may be wrong? or where to adjust?

Code where i receive and send:

while ((err = netconn_recv(conn, &buf)) == ERR_OK) 
        do {
             netbuf_data(buf, &data, &len);
        } while (netbuf_next(buf) >= 0);
        netconn_write(conn, dummy, 14, NETCONN_COPY);

The last debug info from lwip: (I use the serial debug viewer and it cant
handle that much data, so sometimes the debug text get partially overwritten
by a new line)

pbuf_alloc(length=20) == 20001898
pbuf_header: old 200018cc new 200018b8 (20)
pbuf_header: old 200018b8 new 200018aa (14)
lpc_low_level_output: pbuf packet(200018aa) sent, chain#=0, size = 54
plbufpc_tx_recpbuf_alloc(l_free(200018laim_st: Freength=1536)98)
pbuf_freeing packet 
lpc_rx_queue: 2000189820001898 (ine: could not has ref 1, dex 1)
pbuf allocate RXending here._free(20001 pbuf (free 
lpc_free: deallrxqueue_pbufocating 2000: pbuf pack1898
et queued: 20004748 (free desc=0)
lpc_low_level_input: Packet dropped since it could not allocate Rx Buffer
lpc_rx_queue: could not allocate RX pbuf (free desc=1)
lpc_rxqueue_pbuf: pbuf packet queued: 20005f90 (free desc=0)
lpc_low_level_input: Packet dropped since it could not 
lpc_rxqueue_pbuf: pbuf packet queued: 20006bc0 (free desc=0)
lpc_low_level_input: Packet dropped since it could not allocate Rx Buffer

View this message in context: 
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]