summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2017-06-09 17:58:08 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-10 22:06:49 +0200
commitcd99c3776351e1b90ac05ff527553f8a29c03583 (patch)
tree924bf793a9e672a7ef2d828350646592974fd0bf
parentnetns: fix error code when the nsid is already used (diff)
downloadlinux-cd99c3776351e1b90ac05ff527553f8a29c03583.tar.xz
linux-cd99c3776351e1b90ac05ff527553f8a29c03583.zip
bonding: warn user when 802.3ad speed is unknown
Goal is to advertise the user when ethtool speeds and 802.3ad speeds are desynchronized. When this case happens, the kernel needs to be patched. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_3ad.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index b44a6aeb346d..165a8009c640 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -322,6 +322,11 @@ static u16 __get_link_speed(struct port *port)
default:
/* unknown speed value from ethtool. shouldn't happen */
+ if (slave->speed != SPEED_UNKNOWN)
+ pr_warn_once("%s: unknown ethtool speed (%d) for port %d (set it to 0)\n",
+ slave->bond->dev->name,
+ slave->speed,
+ port->actor_port_number);
speed = 0;
break;
}