lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] implementing device driver: netif events handling


From: jblackarty
Subject: [lwip-users] implementing device driver: netif events handling
Date: Thu, 9 Aug 2012 12:08:05 +0700

Hi all,

1. How to make driver to be notified when application sets it's interface
up/down ? It's needed to remove unnecessary system load by disabling
transmit path in hardware. There are LWIP_NETIF_STATUS_CALLBACK and
LWIP_NETIF_LINK_CALLBACK capabilities exist but seems that they
intended to be used by application rather then by driver.

2. Link change events initiated by driver are not thread-safe.
Wiki page
http://lwip.wikia.com/wiki/Writing_a_device_driver#Link_change_events
claims that driver should use netif_set_link_up/netif_set_link_down
functions. But they manipulate netif flags directly. Moreover, they
directly call several lwip processing functions leading to execute them in
driver thread context.

3. Removing network interface doesn't inform driver. It causes driver
to continue input of incoming packets with invalid netif. (However, resolving
issue #1 could resolve this one too.)


Regards,
Artem Pisarenko




reply via email to

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