On Fri, May 04, 2001 at 02:01:52AM +0200, David S. Miller wrote:
>
> Janice Girouard writes:
> > The last netdev_state_t flag is managed by the routines
> > netif_carrier_on(...*dev) and netif_carrier_off(...*dev). These are macros
> > defined in netdevice.h . For some reason, these macros do not send a
> > notifier_call_chain(....NETDEV_CHANGE,dev) event (or any NETDEV event).
> > Is there a reason for this? It seems important to know if the line
> > is known to be functional. The netif_carrier_on/off routines are
> > relatively new. Is it possible that this is an oversight? It seems
> > like this macro might call netdev_state_change in dev.c, since this
> > routine is "Called to indicate a device has changed state".
>
> It is not a physical state change. This state bit is meant only as a
> hack for the isdn layers dial on demand like functionality.
>
> This is not the kind of state change the notifier chain listeners are
> interested in. It would be meaningless for the notifiers to run
> every time I yank my ethernet cable out of the card on my machine :-)
Not the current ones.
It would be useful in some cases to trigger a TCP retransmit though.
This is needed for good behaviour on dynamic IP addresses with the ip_dynaddr
hack. ip_dynaddr can only rewrite the socket from the dummy dialdevice address
to the real dynamic address when it gets a retransmit from transport layer.
When IFF_DYNAMIC is set it makes sense to have a notifier in TCP listen
to it and call tcp_simple_retransmit().
[implementing this is on my todo list and I hopefully will get to it soon...]
-Andi
|