The Netvsc Poll Mode driver (PMD) provides support for the paravirtualized network device for Microsoft Hyper-V. It can be used with Window Server 2008/2012/2016, Windows 10. The device offers multi-queue support (if kernel and host support it), checksum and segmentation offloads.
In this release, the hyper PMD driver provides the basic functionality of packet reception and transmission.
The Netvsc PMD is a standalone driver, similar to virtio and vmxnet3. Using Netvsc PMD requires that the associated VMBUS device be bound to the userspace I/O device driver for Hyper-V (uio_hv_generic). By default, all netvsc devices will be bound to the Linux kernel driver; in order to use netvsc PMD the device must first be overridden.
The first step is to identify the network device to override. VMBUS uses Universal Unique Identifiers (UUID) to identify devices on the bus similar to how PCI uses Domain:Bus:Function. The UUID associated with a Linux kernel network device can be determined by looking at the sysfs information. To find the UUID for eth1 and store it in a shell variable:
DEV_UUID=$(basename $(readlink /sys/class/net/eth1/device))
There are several possible ways to assign the uio device driver for a device. The easiest way (but only on 4.18 or later) is to use the driverctl Device Driver control utility to override the normal kernel device.
driverctl -b vmbus set-override $DEV_UUID uio_hv_generic
Any settings done with driverctl are by default persistent and will be reapplied on reboot.
On older kernels, the same effect can be had by manual sysfs bind and unbind operations:
NET_UUID="f8615163-df3e-46c5-913f-f2d2f965ed0e" modprobe uio_hv_generic echo $NET_UUID > /sys/bus/vmbus/drivers/uio_hv_generic/new_id echo $DEV_UUID > /sys/bus/vmbus/drivers/hv_netvsc/unbind echo $DEV_UUID > /sys/bus/vmbus/drivers/uio_hv_generic/bind
Note
The dpkd-devbind.py script can not be used since it only handles PCI devices.
The following prerequisites apply:
The user can specify below argument in devargs.
latency:
A netvsc device uses a mailbox page to indicate to the host that there is something in the transmit queue. The host scans this page at a periodic interval. This parameter allows adjusting the value that is used by the host. Smaller values improve transmit latency, and larger values save CPU cycles. This parameter is in microseconds. If the value is too large or too small it will be ignored by the host. (Default: 50)