lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19347] netif_add & tcpip_init problem


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19347] netif_add & tcpip_init problem
Date: Fri, 23 Mar 2007 08:56:36 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #8, bug #19347 (project lwip):

I'm agree with Simon (and in fact, it was in another thread about
dhcp_stop/start we have talk about that). Changes will add some source code,
but no footprint increase if yor don't enable the option (which will be
disable per default). Even, performance don't change...

Perhaps the title is not good "netif lists change & tcpip_init" would be
better?

I give you some samples, and I'm interrest about the way you solve them (it's
good if there is another solution, I don't think I got all the good solutions
:) ):

- your network interface is initialized before tcpip_init, and it receive a
packet, what is done to avoid to use an uninitialized tcpip's mbox?

- you have dynamic network interfaces, you want to add a netif when you plug
a pcmcia card (wifi, umts,...), and to remove it when you unplug it. How to
avoid to crash if you remove it from netif'list (tcpip_thread access to this
list, and netif_remove can have a concurrent access with it)? Perhaps, a
alternative solution (but I don't like it) will be to add all interfaces -
even if there are not plugged - and to handle inside the driver the
plug/unplug operations?

- your network interface is initialized after tcpip_init, even it this case
seems to not cause a problem with list operations, what will happen if two
thread try to add in the same time a netif (power up time by example) ? Look
these two lines from netif_add:
  
  netif->next = netif_list;
  netif_list = netif;

I have the risk than one of the interface was not insert in the list (say the
netif1 is interface for add by thread1, netif2 by thread2):
   
   netif1->next = netif_list;
   netif2->next = netif_list;
   netif_list = netif2;
   netif_list = netif1;
   !!! netif2 is not in the list !!!!

Last, about 24h delay, you are right. But Monday & Thursday, except Kieran,
there wasn't lot of active developpers "inline" (even you wasn't "inline"
seems some weeks...). I know that everyone have to take time (vacation &
others), but even 24h seems short. But I will respect that, and I wait more
next time...

Perhaps it would be useful to know how (and when?) each one work and use
lwIP?

So, I'm working in the south of the France (GMT+1+daylight), and I'm using
Ethernet interfaces (and next, Wifi), using lwIP sockets layer, on a DSP
platform (NXP), using pSOS/OSAL. I don't use internal lwIP features (sys.h
interface) in my application level (no timeouts, and I directly use my OS
Semaphore, Queue, etc...).  I prefer to use sockets layer because I want to
be able to port my applications & protocols in another stack or environment
is need. My products have to be used in any network environment (private
network, internet, receiving/sending lot of packets, ~4Mbps ...). Network
settings have to be done in runtime (dhcp/static, etc...).






  

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19347>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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