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: Mon, 19 Mar 2007 17:53:17 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

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

                 Summary: netif_add & tcpip_init problem
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: lundi 19.03.2007 à 18:53
                Category: None
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I've already talk about that with Simon, but I would like to get some other
comments about initialization time.

netif_add and tcpip_init have a problem in a multithread environment:

If the network interface is added before tcpip_init is called, then, if the
driver have packets to send to tcpip_thread, it can call the tcpip_thread's
mbox before it was initialized and can cause a crash (or perhaps it's
something to check in sys_arch? It's something I would like to add in
documentation).

If the driver is added after tcpip_init, then, there is no possibility to do
it in the tcpip_thread context (which use netif'list in most processing).
Exception, you can do it in the tcpip_init_done callback, but only one time
(if you have any "dynamic" network interface, it can be a problem).

I think the "good" thing to do is to add new tcpip_msg_types to be able to
add/remove an interface at any time after tcpip_init (with configuration
option is not needed).

Last, when I look in some ports, it seems that netif_init() is not called in
"simnode" & "simrouter". In "unixlib.c", the netif_init() is done AFTER
tcpip_init (it should be call BEFORE). 

About this initialisation problem, "simhost" & "unixlib" add network
interfaces AFTER tcpip_init, and "simnode" & "simrouter" BEFORE.

So, can you provide some comments about the way you actually do your
initialisation, and what you think about this "problem"?





    _______________________________________________________

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]