netdev
[Top] [All Lists]

Re: NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified

To: davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
Subject: Re: NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified
From: "Janice Girouard" <girouard@xxxxxxxxxx>
Date: Thu, 3 May 2001 19:03:44 -0400
Importance: Normal
Sender: owner-netdev@xxxxxxxxxxx
Does anyone have an opinion or insight on this?

Janice

__________________________________________________________________
Janice Girouard
girouard@xxxxxxxxxx
512-838-7981


---------------------- Forwarded by Janice Girouard/Austin/IBM on
03/05/2001 18:01 ---------------------------

Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> on 02/05/2001 18:58:49

To:   Janice Girouard/Austin/IBM@IBMUS
cc:
Subject:  Re: NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified



I dont know actually - Id agree it seems useful for some links, wan
especially.
Ask davem@xxxxxxxxxx or netdev@xxxxxxxxxxx


Janice Girouard
02/05/2001 17:47

To:   alan@xxxxxxxxxxxxxxxxxxx
cc:
From: Janice Girouard/Austin/IBM@IBMUS
Subject:  NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified



Alan,

I have been looking at the subroutine notifier_call_chain code in dev.c.
I see that this seems to be triggered when changes are made to the
device "state".    The dev->state variable can be
     netdev_state_t {
          __LINK_STATE_XOFF=0,
          __LINK_STATE_START,
          __LINK_STATE_PRESENT,
          __LINK_STATE_NOCARRIER}

In places like dev_close, and dev_open, I see that both the state is
changed and a call is made to notifier_call_chain(...NETDEV_CHANGE, dev).
There are ten events that the notifier_call_chain recognizes (NETDEV_UP,
NETDEV_DOWN, NETDEV_REBOOT, NETDEV_CHANGE, NETDEV_REGISTER,
NETDEV_UNREGISTER, NETDEV_CHANGEMTU, NETDEV_CHANGEADDR, NETDEV_GOING_DOWN,
NETDEV_CHANGENAME). I see many calls to notifier_call_chain(...NETDEV_...)
whenever significant events occur.

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".

Janice

__________________________________________________________________
Janice Girouard
girouard@xxxxxxxxxx
512-838-7981




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