This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Getting lwIP SLIP to work


I'm having problems with lwIP SLIP stability. Specifically
I can connect using ftp to ftpd and download, but after 2-10
downloads of a 6k file, the system eventually livelocks. It is "stuck" 
in the SLIP loop and is unable to allocate more memory.

Has anybody managed to deploy lwIP SLIP  sucessfully?

My current hunch is that lwIP does not properly shut down connections 
after it has run out of of memory(in tcp_slowtmr?). 

As near as I can understand the intended 
behaviour is for lwIP to drop connections until memory is freed up. 
I believe the ftpd session sits in lwip_recv() forever waiting for more data.

Configuring the lwIP memory options is not for the faint of heart! :-)


I had to make the attached changes to get lwIP over SLIP up and running.


Øyvind

Index: init.c
===================================================================
RCS file: /cvsroot/lwip/contrib/ports/ecos/ecos/net/lwip_tcpip/current/src/ecos/init.c,v
retrieving revision 1.14
diff -a -w -u -r1.14 init.c
--- init.c	9 Jan 2004 15:36:06 -0000	1.14
+++ init.c	12 Mar 2004 15:08:55 -0000
@@ -154,6 +154,7 @@
 #if LWIP_SLIP	
 	lwip_set_addr(&mynetif);
 	slipif_init(&mynetif);
+	netif_set_default(&mynetif);
 #elif PPP_SUPPORT
 	pppInit();
 #if PAP_SUPPORT || CHAP_SUPPORT

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]