mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[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>
This commit is contained in:
+2
-1
@@ -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 ) ) {
|
||||
|
||||
Reference in New Issue
Block a user