1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright 2017 6WIND S.A. 3 Copyright 2017 Mellanox Technologies, Ltd 4 5VDEV_NETVSC driver 6================== 7 8The VDEV_NETVSC driver (**librte_net_vdev_netvsc**) provides support for NetVSC 9interfaces and associated SR-IOV virtual function (VF) devices found in 10Linux virtual machines running on Microsoft Hyper-V_ (including Azure) 11platforms. 12 13.. _Hyper-V: https://docs.microsoft.com/en-us/windows-hardware/drivers/network/overview-of-hyper-v 14 15Implementation details 16---------------------- 17 18Each instance of this driver effectively needs to drive two devices: the 19NetVSC interface proper and its SR-IOV VF (referred to as "physical" from 20this point on) counterpart sharing the same MAC address. 21 22Physical devices are part of the host system and cannot be maintained during 23VM migration. From a VM standpoint they appear as hot-plug devices that come 24and go without prior notice. 25 26When the physical device is present, egress and most of the ingress traffic 27flows through it; only multicasts and other hypervisor control still flow 28through NetVSC. Otherwise, NetVSC acts as a fallback for all traffic. 29 30To avoid unnecessary code duplication and ensure maximum performance, 31handling of physical devices is left to their original PMDs; this virtual 32device driver (also known as *vdev*) manages other PMDs as summarized by the 33following block diagram:: 34 35 .------------------. 36 | DPDK application | 37 `--------+---------' 38 | 39 .------+------. 40 | DPDK ethdev | 41 `------+------' Control 42 | | 43 .------------+------------. v .--------------------. 44 | failsafe PMD +---------+ vdev_netvsc driver | 45 `--+-------------------+--' `--------------------' 46 | | 47 | .........|......... 48 | : | : 49 .----+----. : .----+----. : 50 | tap PMD | : | any PMD | : 51 `----+----' : `----+----' : <-- Hot-pluggable 52 | : | : 53 .------+-------. : .-----+-----. : 54 | NetVSC-based | : | SR-IOV VF | : 55 | netdevice | : | device | : 56 `--------------' : `-----------' : 57 :.................: 58 59 60This driver implementation may be temporary and should be improved or removed 61either when hot-plug will be fully supported in EAL and bus drivers or when 62a new NetVSC driver will be integrated. 63 64 65Runtime Configuration 66--------------------- 67 68This driver is invoked automatically in Hyper-V VM systems unless the user 69invoked it by command line using ``--vdev=net_vdev_netvsc`` EAL option. 70 71The following device parameters are supported: 72 73- ``iface`` [string] 74 75 Provide a specific NetVSC interface (netdevice) name to attach this driver 76 to. Can be provided multiple times for additional instances. 77 78- ``mac`` [string] 79 80 Same as ``iface`` except a suitable NetVSC interface is located using its 81 MAC address. 82 83- ``force`` [int] 84 85 If nonzero, forces the use of specified interfaces even if not detected as 86 NetVSC. 87 88- ``ignore`` [int] 89 90 If nonzero, ignores the driver running (actually used to disable the 91 auto-detection in Hyper-V VM). 92 93.. note:: 94 95 Not specifying either ``iface`` or ``mac`` makes this driver attach itself to 96 all unrouted NetVSC interfaces found on the system. 97 Specifying the device makes this driver attach itself to the device 98 regardless the device routes. 99