netdev
[Top] [All Lists]

Re: NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified
From: Andi Kleen <ak@xxxxxx>
Date: Fri, 4 May 2001 20:17:02 +0200
Cc: Janice Girouard <girouard@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <15089.61808.45075.22401@xxxxxxxxxxxxxxx>; from davem@xxxxxxxxxx on Fri, May 04, 2001 at 02:01:52AM +0200
References: <OFB119B0E7.1542F70A-ON85256A41.007E73C4@xxxxxxxxxxxxxxx <OFB119B0E7.1542F70A-ON85256A41.007E73C4@xxxxxxxxxxxxxxx > <15089.61808.45075.22401@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>