diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-06-25 16:41:39 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-06-25 16:46:47 +0100 |
commit | f3812395a261b80fe77d19ebb9045e790c434773 (patch) | |
tree | d68ece89cfa39a4976b5dad99d2cb466dee704ca /src/usr | |
parent | 7e7870984b4e63eeaf8416289c11bc386a77d5ba (diff) | |
download | ipxe-f3812395a261b80fe77d19ebb9045e790c434773.tar.gz |
[netdevice] Add a generic concept of a "blocked link"
When Spanning Tree Protocol (STP) is used, there may be a substantial
delay (tens of seconds) from the time that the link goes up to the
time that the port starts forwarding packets.
Add a generic concept of a "blocked link" (i.e. a link which is up but
which is not expected to communicate successfully), and allow "ifstat"
to indicate when a link is blocked.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/ifmgmt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usr/ifmgmt.c b/src/usr/ifmgmt.c index 3228a4874..aefdaa45d 100644 --- a/src/usr/ifmgmt.c +++ b/src/usr/ifmgmt.c @@ -103,11 +103,12 @@ static void ifstat_errors ( struct net_device_stats *stats, */ void ifstat ( struct net_device *netdev ) { printf ( "%s: %s using %s on %s (%s)\n" - " [Link:%s, TX:%d TXE:%d RX:%d RXE:%d]\n", + " [Link:%s%s, TX:%d TXE:%d RX:%d RXE:%d]\n", netdev->name, netdev_addr ( netdev ), netdev->dev->driver_name, netdev->dev->name, ( netdev_is_open ( netdev ) ? "open" : "closed" ), ( netdev_link_ok ( netdev ) ? "up" : "down" ), + ( netdev_link_blocked ( netdev ) ? " (blocked)" : "" ), netdev->tx_stats.good, netdev->tx_stats.bad, netdev->rx_stats.good, netdev->rx_stats.bad ); if ( ! netdev_link_ok ( netdev ) ) { |