blob: e556207158b3dee503a4e7848b04b58e123d6722 [file] [log] [blame]
jdenisco82b22f72018-12-17 15:45:21 -05001.. _vmxnet3:
2
3VPP with VMware/Vmxnet3
4=======================
5
6This section describes a native Vmxnet3 driver that is included with VPP.
7This driver is written as a plugin and is found in src/plugin/vmxnet3.
8
9Advantages
10----------
11
12The native VPP native vmxnet3 driver provides the following features
13that are not provided with the standard dpdk vmxnet3 driver.
14
15- Interrupt mode
16- Adaptive mode
17- TSO/LRO mode
18
19Does not support
20----------------
21
22This driver does yet support the following features.
23
24- NUMA support
25- RSS/multiple queues
26- VLAN filter
27
28Prerequisites
29-------------
30
31- This code is tested with vfio-pci driver installed with Ubuntu 18.04
32 which has kernel version 4.15.0-33-generic.
33
34- This code is tested with ESXi vSwitch version 6.0, release build
35 3620759.
36
37- Driver requires MSI-X interrupt support, which is not supported by
38 uio_pci_generic driver, so vfio-pci needs to be used. On systems
39 without IOMMU vfio driver can still be used with recent kernels which
40 support no-iommu mode.
41
jdeniscof5de0362019-01-30 10:43:43 -050042VMware Fusion for Mac
43---------------------
44
45VMware fusion does not have a menu option to change the default driver (e1000)
46to the **vmxnet3** driver. VPP supports the **vmxnet3** driver.
47
48These instructions describe how to change the e100 driver for VMware fusion.
49
50* From the VMware Fusion menu bar select **Window** then **Virtual Machine Library**.
51* From the Virtual Machine menu right click on the Virtual Machine you are using and select **Show in Finder**
52* Find the name associated with the VM you are using, right click on it and select **Show Package Contents**
53* Find the **.vmx** file and edit it.
54* Find all the occurences of **e1000** and change them to **vmxnet3**
55
56If you are concerned more with configuration not performance the vmxnet3 driver can be set to
57**interrupt** mode in VPP. This will save a great deal on battery usage. Do this with the following
58
59.. code-block:: console
60
61 # vppctl set interface rx-mode <interface> interrupt
62
63
jdenisco82b22f72018-12-17 15:45:21 -050064System setup
65~~~~~~~~~~~~
66
67To use the native VPP vmxnet3 driver use the following Steps
68
69Load VFIO driver
70
71.. code-block:: console
72
73 $ sudo modprobe vfio-pci
74
75For systems without IOMMU only, enable unsafe NOIOMMU mode
76
77.. code-block:: console
78
79 $ echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
80
81To bind interface to vfio-pci first install the :ref:`configutil`. This will download
82the dpdk_devbind.py script. It is located in */usr/vpp/vpp-config/scripts* with Centos
83and */usr/local/vpp/vpp-config/scripts* with Ubuntu.
84
85Bind the driver with the following commands:
86
87.. code-block:: console
88
89 $ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py -s
90
91 Network devices using DPDK-compatible driver
92 ============================================
93 <none>
94
95 Network devices using kernel driver
96 ===================================
97 0000:03:00.0 'VMXNET3 Ethernet Controller' if=ens160 drv=vmxnet3 unused=vfio-pci,uio_pci_generic
98 0000:0b:00.0 'VMXNET3 Ethernet Controller' drv=vfio-pci unused=vmxnet3,uio_pci_generic
99 0000:13:00.0 'VMXNET3 Ethernet Controller' drv=vfio-pci unused=vmxnet3,uio_pci_generic
100 .....
101
102 $ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py --bind vfio-pci 0b:00.0
103
104
105Interface Creation
106~~~~~~~~~~~~~~~~~~
107
108Now create the interface dynamically with following:
109
110.. code-block:: console
111
112 $ sudo vppctl create interface vmxnet3 0000:0b:00.0
113 $ sudo set int state vmxnet3-0/b/0/0 up
114
115Interface Deletion
116~~~~~~~~~~~~~~~~~~
117
118If the interface needs to be deleted:
119
120.. code-block:: console
121
122 $ sudo delete interface vmxnet3 <if-name>
123
124Show vmxnet3
125~~~~~~~~~~~~
126
127Interface and ring information can be obtained with the command
128**show vmxnet3 [if-name] [desc]**
129
130For example:
131
132.. code-block:: console
133
134 $ sudo vppctl show vmxnet
135 Interface: vmxnet3-0/b/0/0 (ifindex 1)
136 Version: 1
137 PCI Address: 0000:0b:00.0
138 Mac Address: 00:50:56:88:63:be
139 hw if index: 1
140 Device instance: 0
141 Number of interrupts: 2
142 Queue 0 (RX)
143 RX completion next index 786
144 RX completion generation flag 0x80000000
145 ring 0 size 4096 fill 4094 consume 785 produce 784
146 ring 1 size 4096 fill 4096 consume 0 produce 0
147 Queue 0 (TX)
148 TX completion next index 216
149 TX completion generation flag 0x0
150 size 4096 consume 216 produce 245