lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Making lwIP thread safe


From: Jonathan Larmour
Subject: Re: [lwip-users] Making lwIP thread safe
Date: Mon, 21 Apr 2008 13:50:21 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Bob McConnell wrote:
> address@hidden wrote:
>>
>> That said, if I understand you correctly, you want to run 200 full
>> instances of lwIP in one process: that doesn't work (also,
>> intentionally): many parts in lwIP use global or static variables (the
>> whole stack is _not_ reentrant). After all, running lwIP in a process
>> is much like running it on its own device (a completely seperate
>> address space). Running 2 instances in 2 different threads in the same
>> process is like running it twice on the same device: you could make it
>> work with a high effort, but there's no use for that in normal life...
> 
> I knew there was one large company in the Northwest USA that doesn't
> believe testing is part of normal life, but I wasn't aware that everyone
> believed that. Be that as it may, many devices need multiple stacks
> running, for example one for a network interface and a second for ppp on
> a serial port. This can be done with Rabbits and PICs, so it should
> qualify as a valid target. I believe you have taken much too narrow a
> view of normal life.

lwIP supports multiple network interfaces - the normal, and reasonable
expectation, is that nothing in lwIP prevents you having a single stack
with both an ethernet and ppp interface. That being said....

> But I also think you misread my description. I need 2000 full instances
> running simultaneously. Only the prototype may be limited to 200. Each
> instance must emulate one of several different devices and open a
> permanent TCP connection with a transaction server using a unique IP
> source address. This eliminates UML and VMWare as hosts, since they
> cannot support anywhere near that many sessions. It is not possible to
> set up that many devices  in our facility, even if we emptied out the
> entire warehouse to make room for them. Perhaps you can suggest some
> other way to implement this test bench?

Supporting that many interfaces simultaneously is not a particularly narrow
view - it's extremely unusual. lwIP, being lightweight, would not be well
optimised for the case of 2000 netifs. netifs are held on a list which is
processed in a simple linear way.

But on the other hand, you talk about "Rabbits and PICs", so does that mean
each copy of lwIP would run on its own processor in its own address space?

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
 **  Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv>  **
 **  April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]