]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: show saner speed for broadcast mode
authorJarod Wilson <jarod@redhat.com>
Thu, 13 Aug 2020 14:09:00 +0000 (10:09 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Aug 2020 03:39:33 +0000 (20:39 -0700)
commit09409cea2e6108ec71458c57abd7d8463b78e232
tree16d6448241f3ae317e330f58e9217b7cf3a9716f
parent976b36b3441b3fe86ae9c5cdb76debae596cf690
bonding: show saner speed for broadcast mode

Broadcast mode bonds transmit a copy of all traffic simultaneously out of
all interfaces, so the "speed" of the bond isn't really the aggregate of
all interfaces, but rather, the speed of the slowest active interface.

Also, the type of the speed field is u32, not unsigned long, so adjust
that accordingly, as required to make min() function here without
complaining about mismatching types.

Fixes: 62a28c5e0650 ("bond: add support to read speed and duplex via ethtool")
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c