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]

Re: simultaneous socket write/close causes panic?


On Tue, Nov 05, 2002 at 05:17:37AM +0000, Jonathan Larmour wrote:

> Just to summarise: the application is almost certainly broken
> because it shouldn't do stuff like this because the socket fd
> number may be reallocated (modulo micromanagement of the code
> so you could guarantee that it wouldn't be).

Yes.  Perhaps the customer is doing that sort of management,
but I'd still claim it's broken code.

> The stack is
> *also* broken as it shouldn't panic.

Yes.

> Nick Garnett wrote:
> > I would contend that the locking regime in the TCP/IP stack is at
> > present not right and needs to be fixed.
> 
> Potentially, or more accurately Grant should use the new
> FreeBSD stack :-).

Probably so.  It would require adding the fileio package also.
If I had a spare day or two...  

Are there noticable performance differences between the two
stacks?  We're running out of horsepower in our ARM7 app with
lots of TCP/IP connections running.  If the new stack required
fewer memcpy() operations it would be a huge win.  My Ethernet
does DMA but not scatter gather, so having the Tx packets
presented to me in chunks is a big performance hit.

> Anyway, Hugo did a lot of work in this area at one point.
> Grant, you said the code was from an eCos and net snapshot from
> Jan 2001. Even so, does it definitely have this change:
> 
> 2000-09-01  Hugo Tyson  <hmt@cygnus.co.uk>
> 
>          * OVERVIEW: This is part of the change to the network stack to
> [snip]

Yes.  My tcpip ChangeLog goes up through:

2000-11-15  Hugo Tyson  <hmt@redhat.com>

        * src/lib/bootp_support.c (init_net): Do a SIOCSIFADDR a 2nd time
        after setting the netmask (SIOCSIFNETMASK) in order for the newly
        [...]

-- 
Grant Edwards
grante@visi.com

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


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