linux/drivers/net
Andy Gospodarek bb5b052f75 bond: add support to read speed and duplex via ethtool
This patch adds support for the get_settings ethtool op to the bonding
driver.  This was motivated by users who wanted to get the speed of the
bond and compare that against throughput to understand utilization.
The behavior before this patch was added was problematic when computing
line utilization after trying to get link-speed and throughput via SNMP.

Output from ethtool looks like this for a round-robin bond:

Settings for bond0:
	Supported ports: [ ]
	Supported link modes:   Not reported
	Supported pause frame use: No
	Supports auto-negotiation: No
	Advertised link modes:  Not reported
	Advertised pause frame use: No
	Advertised auto-negotiation: No
	Speed: 11000Mb/s
	Duplex: Full
	Port: Other
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: off
	MDI-X: Unknown
	Link detected: yes

I tested this and verified it works as expected.  A test was also done
on a version backported to an older kernel and it worked well there.

v2: Switch to using ethtool_cmd_speed_set to set speed, added check to
SLAVE_IS_OK for each slave in bond, dropped mode-specific calculations
as they were not needed, and set port type to 'Other.'

v3: Fix useless assignment and checkpatch warning.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19 16:39:50 -04:00
..
appletalk appletalk: remove "config IPDDP_DECAP" 2013-03-22 10:21:09 -04:00
arcnet
bonding bond: add support to read speed and duplex via ethtool 2013-04-19 16:39:50 -04:00
caif caif: remove caif_shm 2013-03-17 12:16:38 -04:00
can Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next 2013-04-16 16:43:39 -04:00
cris
dsa DSA: Convert spaces to tabs where appropriate 2013-01-10 00:04:34 -08:00
ethernet qlcnic: Update version to 5.2.41 2013-04-19 16:14:54 -04:00
fddi drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0) 2013-03-17 12:50:24 -04:00
hamradio yam: remove redundant null check on dev 2013-03-27 14:30:55 -04:00
hippi rrunner.c: fix possible memory leak in rr_init_one() 2013-03-10 16:42:23 -04:00
hyperv net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_* 2013-04-19 14:45:26 -04:00
ieee802154 at86rf230: change irq handling to prevent lockups with edge type irq 2013-04-16 16:34:08 -04:00
irda net: au1k_ir: Use module_platform_driver() 2013-03-20 13:25:36 -04:00
phy netdev/phy: Implement ieee802.3 clause 45 in mdio-octeon.c 2013-04-07 17:12:01 -04:00
plip net: add ETH_P_802_3_MIN 2013-03-28 01:20:42 -04:00
ppp ppp: reuse print_hex_dump_bytes 2013-03-27 12:48:33 -04:00
slip tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
team net: vlan: prepare for 802.1ad VLAN filtering offload 2013-04-19 14:45:27 -04:00
usb net: vlan: add protocol argument to packet tagging functions 2013-04-19 14:46:06 -04:00
vmxnet3 net: vlan: add protocol argument to packet tagging functions 2013-04-19 14:46:06 -04:00
wan Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
wimax Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2013-04-10 10:39:27 -04:00
xen-netback xen-netback: switch to use skb_partial_csum_set() 2013-04-12 14:58:33 -04:00
Kconfig VXLAN: Fix vxlan stats handling. 2013-03-26 12:27:18 -04:00
LICENSE.SRC
Makefile net: Add support for NTB virtual ethernet device 2013-01-17 19:11:14 -08:00
Space.c drivers/net: delete old x86 variant of the seeq8005 driver 2013-01-22 10:39:56 -05:00
dummy.c
eql.c
ifb.c net: vlan: announce STAG offload capability in some drivers 2013-04-19 14:46:06 -04:00
loopback.c net: loopback: fix a dst refcounting issue 2013-01-27 01:30:35 -05:00
macvlan.c net: vlan: announce STAG offload capability in some drivers 2013-04-19 14:46:06 -04:00
macvtap.c net: switch to use skb_probe_transport_header() 2013-03-27 12:48:31 -04:00
mdio.c
mii.c
netconsole.c netconsole: don't call __netpoll_cleanup() while atomic 2013-03-12 06:58:55 -04:00
ntb_netdev.c ntb_netdev: Update Version 2013-01-20 15:48:14 -08:00
rionet.c
sb1000.c
sungem_phy.c
tun.c tuntap: initialize vlan_features 2013-04-11 16:21:57 -04:00
veth.c net: vlan: announce STAG offload capability in some drivers 2013-04-19 14:46:06 -04:00
virtio_net.c net: vlan: prepare for 802.1ad VLAN filtering offload 2013-04-19 14:45:27 -04:00
vxlan.c vxlan: Allow setting destination to unicast address. 2013-04-16 16:43:35 -04:00
xen-netfront.c xen-netfront: frags -> slots in xennet_get_responses 2013-03-25 12:19:26 -04:00