This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Network dead after abnormal break
- To: David Geng <deli dot geng at ncl dot ac dot uk>,eCos discussion <ecos-discuss at sources dot redhat dot com>
- Subject: Re: [ECOS] Network dead after abnormal break
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Mon, 08 Jan 2001 11:54:55 +0000
- Organization: Red Hat UK Ltd.
- References: <000f01c07416$6fbe0300$5210f080@ncl.ac.uk> <3A565551.77EA8D3E@redhat.com> <000801c077cc$27eab1e0$020a0a0a@ncl.ac.uk>
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" <jlarmour@redhat.com>
> To: "David Geng" <deli.geng@ncl.ac.uk>
> Cc: <ecos-discuss@sourceware.cygnus.com>
> 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