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]

Re: Network dead after abnormal break


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

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