netdev
[Top] [All Lists]

Re: How to know the ethernet LINK is down.

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: How to know the ethernet LINK is down.
From: Andi Kleen <ak@xxxxxx>
Date: Sun, 27 Feb 2000 01:05:03 +0100
Cc: "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>, VLAN Mailing List <vlan@xxxxxxxxxxxxxxxx>
In-reply-to: <38B81FAA.9CB62163@xxxxxxxxxxxxxxx>; from Ben Greear on Sat, Feb 26, 2000 at 07:24:39PM +0100
References: <38B81FAA.9CB62163@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Sat, Feb 26, 2000 at 07:24:39PM +0100, Ben Greear wrote:
> I'm working on adding link-aggregation to VLANs and I want
> to be able to detect if a link is down (cable pulled, dead
> NIC, dead remote NIC...)  Obviously, some errors will
> not be detectable.

Are you planning to implement LACP ? 

> 
> Right now, I'm planning on testing the ethernet netdevice->flags to see
> if IFF_UP is set.  Will this do what I want?  Are there other things
> I can check?

No, it won't, except on some broken drivers like the 3c90x. Linux really
has no generic interface for this, it is all driver specific (and some
drivers don't notice at all except on timeouts). The cleanest way would be 
to change all the drivers to raise NETDEV_GOING_DOWN events on netdev_chain 
when they detect link loss or too many timeouts. 


-Andi

-- 
This is like TV. I don't like TV.

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