From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: David Geng , eCos discussion Subject: Re: [ECOS] Network dead after abnormal break Date: Mon, 08 Jan 2001 03:54:00 -0000 Message-id: <3A59AA8F.A13E54BA@redhat.com> References: <000f01c07416$6fbe0300$5210f080@ncl.ac.uk> <3A565551.77EA8D3E@redhat.com> <000801c077cc$27eab1e0$020a0a0a@ncl.ac.uk> X-SW-Source: 2001-01/msg00067.html David Geng wrote: > > In my test program, the receiving code is like this: > > while(1) read(sock, buf, sizeof(buf)); > > When the connection is broken, read() will return 0. From then on, if we > continue using read() to try to get some data, the whole TCP/IP stack will > die. That definitely should not happen. Has anyone else observed this? (I haven't got any net-able hardware on my desk right now to try). It does sound like it would be the stack, not the driver. > So I changed like this: > > while( read(sock, buf, sizeof(buf)); > > It works well. The peak receiving speed can reach 1.05MByte, while sending > is 0.9MByte. > > Also I found a bug in the original CS8900A driver. After patch, it can work > more stably and more efficiently. If anyone is interested in it, I can > provide the source code. We're going to be a lot more responsive to patches now, so please send it in! Jifl > ----- Original Message ----- > From: "Jonathan Larmour" > To: "David Geng" > Cc: > Sent: Friday, January 05, 2001 11:14 PM > Subject: Re: [ECOS] Network dead after abnormal break > > > David Geng wrote: > > > > > > Hi, there, > > > > > > The network will die, if a TCP connect is broken abnormally, for example > by > > > Ctrl-C at host. I don't know if it is the problem of TCP/IP stack or my > > > CS8900A driver porting. eCos seems still working, for I can use GDB to > stop > > > it and do some single steps. Maybe the interrupt response is lost. > > > > If it's of any help to know, we've had it working with other drivers, so > it > > may be that driver in particular. > > > > Jifl > > -- > > Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062 > > Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine > > -- Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062 Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine