lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] BasicWeb.c behavior


From: BMW Cyclist RR
Subject: [lwip-users] BasicWeb.c behavior
Date: Fri, 8 Feb 2008 13:49:30 -0500

I am running lwip v1.2.0 with FreeRTOS 4.2.1 on a AT91SAM7X-EK board with an
X512 chip. I have been actively adding UDP and TCP application programs with
only minor issues, but when trying to resolve a resource (memory) issue I've
dropped back to running just the standard BasicWeb.c webserver so I could
better understand what the lwipopts.h values actually do in terms of TCP
internal data structures. I am able to do source level debugging with
Eclipse and the Amontec JTAGKEY along with OpenOCD.

What I've noticed when running just the Webserver application with my other
tasks disabled (all other FreeRTOS tasks are not created) is that the
lwip_stats.memp[3] statistics show that the number of TCP_PCBs used seems to
keep getting bumped everytime the webserver returns a webpage. I've got
MEMP_NUM_TCP_PCB set to 10 (in lwipopts.h) and I see that memp[3].used and
memp[3].max keep climbing with each web browser connection until the limit
of 10 is reached. Then I see memp[3].err get incremented while the
memp[3].used and memp[3].max stay at 10. The webserver continues to operate,
seemingly normally. Is this due to previous TCP connections (i.e..
webserver) hanging around for a while and continuing to tie up TCP_PCBs?

I just checked the system after stopping the web browser and it appears that
after some time, the number of used TCP_PCBs goes back to zero. So I assume
there is a time-out associated with these connections. But why aren't the
TCP_PCBs freed immediately when the webserver executes the netconn_close and
netconn_delete functions?

The webserver seems to continue to operate OK even when it's run out of
TCP_PCBs and is bumping the memp[3].err counter.

Is this normal behavior? I am just getting my feet wet with lwip and
FreeRTOS, so please excuse my ignorance.

Thanks,

Dave Squires

-----------------------------------
SQUIRES ENGINEERING, INC.
2604 Lowell Circle
Melbourne, FL 32935-2215
phone:  (321) 242-8611
fax:    (321) 242-0949
website: http://www.squires-eng.com
-----------------------------------





reply via email to

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