lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] MEMP_NUM_TCP_SEG setting


From: Siva Velusamy
Subject: [lwip-users] MEMP_NUM_TCP_SEG setting
Date: Thu, 30 Aug 2007 11:51:14 -0700

Hi,

I'm seeing the following issue with lwip-1.2.0 with a new port that I'm writing.

When doing a transmit test that keeps sending out maximum sized packets out to a host, for about 90 seconds I get consistent transmit throughput of ~ 94 Mbps. However after that tcp_write returns an error. Some more debugging reveals that at this point, lwIP runs out of memory for allocating TCP segments, and it fails in this line in tcp_out.c:

/* Allocate memory for tcp_seg, and fill in fields. */
    seg = memp_malloc(MEMP_TCP_SEG);

I've had to increase this parameter (MEMP_NUM_TCP_SEG - # of simultaneously queued TCP segments) all the way upto 64, but lwIP stats reports that all 64 are in use. Since I have a TCP_WND of only about 12k on host and 8k on the board, it somehow seems incorrect that there are 64 TCP segments queued up.

Any suggestions on things I should look for in such a case? TCP Receive test (where host sends data to the board running lwIP) works fine for over 15 minutes without any issues at the same high 94 Mbps bandwidth.

Thanks,
Siva
--
In the end, everything is a gag.
           Charlie Chaplin
reply via email to

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