Ethtool Support for Microsoft Hyper-V

Ethtool Support for Microsoft Hyper-V is a programming project to implement support of the Linux command-line application "ethtool" on Microsoft Hyper-V guest virtual machines. Ethtool is the standard Linux utility for controlling network drivers and hardware, particularly for wired Ethernet devices. The virtual network card in Hyper-V guests does not currently support any interaction with ethtool, and it is our goal to implement full support of ethtool features that are compatible with the virtual network driver.

Design Task
This project involves integration between two applications: Microsoft Hyper-V, a hypervisor which allows Windows, Linux and other OSes to operate as guest operating systems on top of Windows or "bare metal". Like all hypervisors, Hyper-V allows for the simultaneous operation of multiple operating systems.

ethtool, the second piece of software, is a Linux application designed to display or change Ethernet card settings. It is comprised of two parts: the ethtool client and the ethtool API. The ethtool client is the command-line application executed by end-users. The ethtool API is a part of the Linux kernel, which the client calls. In turn, the API makes calls to the Ethernet card driver, which responds and sends the information back down the API to client chain.

Problem Statement
ethtool is currently unsupported when running under Microsoft Hyper-V. Presently, ethtool will only report whether an Ethernet link is successfully detected. Significant features that currently aren't supported, include: displaying Ethernet device settings, displaying Ethernet card capabilities and changing settings to the device. Additionally, ethtool will typically report the available features of an Ethernet card, when run with no command-line options. However, under Hyper-V, ethtool incorrectly reports that the card has no features.

Design Goals
Our goal is to provide the means for ethtool to properly report, display and change settings for Ethernet cards. This process consists of several parts:


 * 1) The default output must show the supported features of the card.
 * 2) Ethernet device settings must display accurate information.
 * 3) Modifying settings must properly change the setting, or report that it wasn't successful.

Our current next-step goals are to:


 * 1) Implement set-channels - Changes the numbers of channels of the specified network device.
 * 2) Implement show-features - Queries the specified network device for the state of protocol offload and other features.
 * 3) Implement set-ring - Changes the rx/tx ring parameters of the specified network device.
 * 4) Implement show-ring - Queries the specified network device for rx/tx ring parameter information.
 * 5) Implement rx on|off - Specifies whether RX checksumming should be enabled.
 * 6) Implement tx on|off - Specifies whether TX checksumming should be enabled.
 * 7) Implement autoneg on|off - Specifies whether autonegotiation should be enabled. Autonegotiation is enabled by default, but in some network devices may have trouble with it, so you can disable it if really necessary.

The functionality which ethtool generally supports includes the ability to:


 * 1) Get identification and diagnostic information
 * 2) Get extended device statistics
 * 3) Control speed, duplex, auto-negotiation and flow-control for Ethernet devices
 * 4) Control checksum offload and other hardware offload features
 * 5) Control DMA ring sizes and interrupt moderation
 * 6) Control receive queue selection for multi-queue devices

Background Research

 * 1) Task information from K. Y. Srinivasan and Haiyang Zhang (sponsors)
 * 2) Linux Driver Project Developer List
 * 3) Kernel Coding Style
 * 4) The Linux Kernel
 * 5) Linux Kernel Hacker's Guide
 * 6) Ethtool Development
 * 7) [git://git.kernel.org/pub/scm/network/ethtool/ethtool.git Ethtool Source]

Current Design

 * 1) Place description of current design from git repo
 * 2) Diagram of where Hyper-Tux sits in current pipeline

Current Progress

 * 1) API map between ethtool and NetVSC
 * 2) Successfully submitted a patch for the show-channels option:
 * This adds support for reporting the combined channels count of the hv_netvsc driver via 'ethtool --show-channels'.


 * Signed-off-by: Andrew Schwartzmeyer 

Justin Hall
Computer Science Student

Hometown: Lewiston, ID

Bio: Justin is a senior in Computer Science at the University of Idaho, currently pursuing his Bachelors of Science. He spends summers as a freelance front-end Javascript developer, particularly the AngularJS framework. His interests focus on front-end and full-stack web development.

Email: [mailto:hall5714@vandals.uidaho.edu hall5714@vandals.uidaho.edu]



Andrew Schwartzmeyer
Computer Science and Mathematics Student

Hometown: Seattle, WA

Bio: Andrew is a senior undergraduate student in Computer Science and Mathematics at the University of Idaho. He is the current chair of the University of Idaho Association of Computing Machinery, and an avid open source developer. He blogs at schwartzmeyer.com, and is interested in Linux systems programming, evolutionary computation, security and cryptography, server administration automation (with Puppet), and functional programming.

Email: [mailto:schw2620@vandals.uidaho.edu schw2620@vandals.uidaho.edu]

Keith Drew
Computer Science Student

Hometown: Olympia, Washington

Bio: Keith is a senior undergraduate student in Computer Science at the University of Idaho. He is also a NSF Scholarship for Service (SFS) CyberCorps Student. He is interested cyber security, specifically secure programming.

Email: [mailto:keithd@vandals.uidaho.edu keithd@vandals.uidaho.edu]

Chris Waltrip
Computer Science Student

Hometown: Coeur d'Alene, ID

Bio: Chris is a senior undergraduate in Computer Science at the University of Idaho. He is also a NSF Scholarship for Service (SFS) CyberCorps Student and system administrator for the Center for Secure and Dependable Systems (CSDS). His interests lie in information assurance and network security.

Email: [mailto:walt2178@vandals.uidaho.edu walt2178@vandals.uidaho.edu]

Presentations
Design Review Presentation

Snapshot Day #1

Snapshot Day #2