[PATCH 0/4] net: updates to ethtool and virtio_net for speed/duplex support

Andy Gospodarek gospo at cumulusnetworks.com
Thu May 12 16:07:29 UTC 2016

Post 4.4, several changes landed upsteam to allow users to set interface
speed for virtio_net backed devices.  This feature is extremely useful
for those doing large-scale networking simulations where Ubuntu-based
VMs are used to simulate hosts.  Not only does it allow hosts to report
the same speed in simulations for monitoring tools, but it is required
to simulate 802.3ad bonding where link-speed is reported to the peer
device.  Without proper speed setting there are cases where establishing
LACP adjacency is not possible.  

After this patch setting the link speed and duplex now works just as one would
expect.  I'm running the kernel that contains this patch for this command and
to send this email:

$ sudo ethtool -s enp0s8 speed 100000 duplex full 
$ sudo ethtool enp0s8
Settings for enp0s8:
	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: 100000Mb/s
	Duplex: Full
	Port: Other
	Transceiver: internal
	Auto-negotiation: off
	Link detected: yes

Other than not filing a bug in launchpad, it appears that the formatting for
the title and body of the actual patches is proper for inclusion based on docs
I found[1].  Apologies if I did not interpret this correctly.  I'm happy to
file a bug in launchpad and post v2 for this set if tracking in launchpad is

1. https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide

Nikolay Aleksandrov (4):
  ethtool: add speed/duplex validation functions
  ethtool: make validate_speed accept all speeds between 0 and INT_MAX
  virtio_net: add ethtool support for set and get of settings
  virtio_net: validate ethtool port setting and explain the user

 drivers/net/virtio_net.c     | 62 ++++++++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/ethtool.h | 17 ++++++++++++
 2 files changed, 79 insertions(+)


More information about the kernel-team mailing list