[Xenial] net: updates to ethtool and virtio_net for speed/duplex support

Bug #1581132 reported by Andy Gospodarek on 2016-05-12
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned
Xenial
Medium
Unassigned

Bug Description

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 these commands:

$ 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
 PHYAD: 0
 Transceiver: internal
 Auto-negotiation: off
 Link detected: yes

I've already submitted patches to the kernel-team mailing list. Those patches can be found in this thread: https://lists.ubuntu.com/archives/kernel-team/2016-May/077286.html

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1581132

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: bot-stop-nagging
Changed in linux (Ubuntu):
status: Incomplete → New
summary: - [XENAIL] net: updates to ethtool and virtio_net for speed/duplex support
+ [Xenial] net: updates to ethtool and virtio_net for speed/duplex support
Brad Figg (brad-figg) on 2016-05-12
Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Xenial):
status: New → Incomplete
Andy Gospodarek (gospo) wrote :

Brad, this isn't really a bug, but a feature request.

Before my patches, it was not possible to get or set link speed on a virtio_net backed device.

$ sudo ethtool enp0s8
Settings for enp0s8:
 Link detected: yes
$ sudo ethtool -s enp0s8 speed 100000 duplex full
Cannot get current device settings: Operation not supported
  not setting speed
  not setting duplex
$ ethtool -i enp0s8
driver: virtio_net
version: 1.0.0
firmware-version:
expansion-rom-version:
bus-info: 0000:00:08.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

As demonstrated in my description this is now possible.

Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Xenial):
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Changed in linux (Ubuntu Xenial):
status: Incomplete → Triaged
Changed in linux (Ubuntu):
importance: Medium → Wishlist
Changed in linux (Ubuntu Xenial):
importance: Medium → Wishlist
tags: added: kernel-da-key
Andy Gospodarek (gospo) wrote :

Any chance I get this categorized slightly higher than wishlist? :-)

I realize it is from someone outside Canonical, but wishlist makes is sound like there is a limited chance this will make it into 16.04 anytime soon....

Changed in linux (Ubuntu):
importance: Wishlist → Medium
Changed in linux (Ubuntu Xenial):
importance: Wishlist → Medium
Tim Gardner (timg-tpi) wrote :

Andy - your patches are out for review on the k-team list. I don't see any issues with them, so I'm pretty sure they'll make the next SRU cycle.

Andy Gospodarek (gospo) wrote :

Excellent! Thanks for letting me know, Tim.

Changed in linux (Ubuntu Xenial):
status: Triaged → Fix Committed
Kamal Mostafa (kamalmostafa) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
Andy Gospodarek (gospo) wrote :

Confirmed that link speed/duplex/etc could set set with ethtool on proposed kernel 4.4.0-25-generic.

tags: added: verification-done verification-done-xenial
removed: verification-needed-xenial
Launchpad Janitor (janitor) wrote :
Download full text (24.1 KiB)

This bug was fixed in the package linux - 4.4.0-25.44

---------------
linux (4.4.0-25.44) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1591289

  * Xenial update to v4.4.13 stable release (LP: #1590455)
    - MIPS64: R6: R2 emulation bugfix
    - MIPS: math-emu: Fix jalr emulation when rd == $0
    - MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC
    - MIPS: Don't unwind to user mode with EVA
    - MIPS: Avoid using unwind_stack() with usermode
    - MIPS: Fix siginfo.h to use strict posix types
    - MIPS: Fix uapi include in exported asm/siginfo.h
    - MIPS: Fix watchpoint restoration
    - MIPS: Flush highmem pages in __flush_dcache_page
    - MIPS: Handle highmem pages in __update_cache
    - MIPS: Sync icache & dcache in set_pte_at
    - MIPS: ath79: make bootconsole wait for both THRE and TEMT
    - MIPS: Reserve nosave data for hibernation
    - MIPS: Loongson-3: Reserve 32MB for RS780E integrated GPU
    - MIPS: Use copy_s.fmt rather than copy_u.fmt
    - MIPS: Fix MSA ld_*/st_* asm macros to use PTR_ADDU
    - MIPS: Prevent "restoration" of MSA context in non-MSA kernels
    - MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...)
    - MIPS: ptrace: Fix FP context restoration FCSR regression
    - MIPS: ptrace: Prevent writes to read-only FCSR bits
    - MIPS: Fix sigreturn via VDSO on microMIPS kernel
    - MIPS: Build microMIPS VDSO for microMIPS kernels
    - MIPS: lib: Mark intrinsics notrace
    - MIPS: VDSO: Build with `-fno-strict-aliasing'
    - affs: fix remount failure when there are no options changed
    - ASoC: ak4642: Enable cache usage to fix crashes on resume
    - Input: uinput - handle compat ioctl for UI_SET_PHYS
    - ARM: mvebu: fix GPIO config on the Linksys boards
    - ARM: dts: at91: fix typo in sama5d2 PIN_PD24 description
    - ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats
    - ARM: dts: imx35: restore existing used clock enumeration
    - ath9k: Add a module parameter to invert LED polarity.
    - ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards.
    - ath10k: fix debugfs pktlog_filter write
    - ath10k: fix firmware assert in monitor mode
    - ath10k: fix rx_channel during hw reconfigure
    - ath10k: fix kernel panic, move arvifs list head init before htt init
    - ath5k: Change led pin configuration for compaq c700 laptop
    - hwrng: exynos - Fix unbalanced PM runtime put on timeout error path
    - rtlwifi: rtl8723be: Add antenna select module parameter
    - rtlwifi: btcoexist: Implement antenna selection
    - rtlwifi: Fix logic error in enter/exit power-save mode
    - rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in
      rtl_pci_reset_trx_ring
    - aacraid: Relinquish CPU during timeout wait
    - aacraid: Fix for aac_command_thread hang
    - aacraid: Fix for KDUMP driver hang
    - hwmon: (ads7828) Enable internal reference
    - mfd: intel-lpss: Save register context on suspend
    - mfd: intel_soc_pmic_core: Terminate panel control GPIO lookup table
      correctly
    - PM / Runtime: Fix error path in pm_runtime_force_resume()
    - cpuidle: Indicate when a device has been unregiste...

Changed in linux (Ubuntu):
status: Triaged → Fix Released
Iain Lane (laney) wrote :

When building systemd with this kernel:

In file included from ../src/udev/net/ethtool-util.c:22:0:
/usr/include/linux/ethtool.h: In function ‘ethtool_validate_speed’:
/usr/include/linux/ethtool.h:1321:18: error: ‘INT_MAX’ undeclared (first use in this function)
  return speed <= INT_MAX || speed == SPEED_UNKNOWN;
                  ^
/usr/include/linux/ethtool.h:1321:18: note: each undeclared identifier is reported only once for each function it appears in

...I think you need to cherry-pick 14e2037902d65213842b4e40305ff54a64abbcb6

tags: added: verification-failed
removed: verification-done verification-done-xenial xenial
tags: added: xenial
Iain Lane (laney) on 2016-06-15
Changed in linux (Ubuntu):
status: Fix Released → Triaged
Andy Gospodarek (gospo) wrote :

Thanks @Iain. I'll propose this now. Apologies for the userspace build failure.

Andy Gospodarek (gospo) wrote :

Patch submitted to ubuntu kernel mailing list: https://lists.ubuntu.com/archives/kernel-team/2016-June/078426.html

Kamal Mostafa (kamalmostafa) wrote :

The userspace build failure has now been fixed via LP: #1592930 and new Xenial kernel (4.4.0-26.45) has been uploaded to -proposed, so ...

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
removed: verification-failed xenial
Andy Gospodarek (gospo) wrote :

Iain, can you confirm that the change from LP: #1592930 this works as expected for you?

Iain Lane (laney) on 2016-06-24
tags: added: verification-done-xenial
removed: verification-needed-xenial
Launchpad Janitor (janitor) wrote :
Download full text (26.1 KiB)

This bug was fixed in the package linux - 4.4.0-28.47

---------------
linux (4.4.0-28.47) xenial; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1595874

  * Linux netfilter local privilege escalation issues (LP: #1595350)
    - netfilter: x_tables: don't move to non-existent next rule
    - netfilter: x_tables: validate targets of jumps
    - netfilter: x_tables: add and use xt_check_entry_offsets
    - netfilter: x_tables: kill check_entry helper
    - netfilter: x_tables: assert minimum target size
    - netfilter: x_tables: add compat version of xt_check_entry_offsets
    - netfilter: x_tables: check standard target size too
    - netfilter: x_tables: check for bogus target offset
    - netfilter: x_tables: validate all offsets and sizes in a rule
    - netfilter: x_tables: don't reject valid target size on some architectures
    - netfilter: arp_tables: simplify translate_compat_table args
    - netfilter: ip_tables: simplify translate_compat_table args
    - netfilter: ip6_tables: simplify translate_compat_table args
    - netfilter: x_tables: xt_compat_match_from_user doesn't need a retval
    - netfilter: x_tables: do compat validation via translate_table
    - netfilter: x_tables: introduce and use xt_copy_counters_from_user

  * Linux netfilter IPT_SO_SET_REPLACE memory corruption (LP: #1555338)
    - netfilter: x_tables: validate e->target_offset early
    - netfilter: x_tables: make sure e->next_offset covers remaining blob size
    - netfilter: x_tables: fix unconditional helper

linux (4.4.0-27.46) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1594906

  * Support Edge Gateway's Bluetooth LED (LP: #1512999)
    - Revert "UBUNTU: SAUCE: Bluetooth: Support for LED on Marvell modules"

linux (4.4.0-26.45) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1594442

  * linux: Implement secure boot state variables (LP: #1593075)
    - SAUCE: UEFI: Add secure boot and MOK SB State disabled sysctl

  * failures building userspace packages that include ethtool.h (LP: #1592930)
    - ethtool.h: define INT_MAX for userland

linux (4.4.0-25.44) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1591289

  * Xenial update to v4.4.13 stable release (LP: #1590455)
    - MIPS64: R6: R2 emulation bugfix
    - MIPS: math-emu: Fix jalr emulation when rd == $0
    - MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC
    - MIPS: Don't unwind to user mode with EVA
    - MIPS: Avoid using unwind_stack() with usermode
    - MIPS: Fix siginfo.h to use strict posix types
    - MIPS: Fix uapi include in exported asm/siginfo.h
    - MIPS: Fix watchpoint restoration
    - MIPS: Flush highmem pages in __flush_dcache_page
    - MIPS: Handle highmem pages in __update_cache
    - MIPS: Sync icache & dcache in set_pte_at
    - MIPS: ath79: make bootconsole wait for both THRE and TEMT
    - MIPS: Reserve nosave data for hibernation
    - MIPS: Loongson-3: Reserve 32MB for RS780E integrated GPU
    - MIPS: Use copy_s.fmt rather than copy_u.fmt
    - MIPS: Fix MSA ld_*/st_* asm macros to use PTR_ADDU
    - MIPS: Prevent "restoration" of MSA c...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers