3 VPP with VMware/Vmxnet3
4 =======================
6 This section describes a native Vmxnet3 driver that is included with VPP.
7 This driver is written as a plugin and is found in src/plugin/vmxnet3.
12 The native VPP native vmxnet3 driver provides the following features
13 that are not provided with the standard dpdk vmxnet3 driver.
22 This driver does yet support the following features.
31 - This code is tested with vfio-pci driver installed with Ubuntu 18.04
32 which has kernel version 4.15.0-33-generic.
34 - This code is tested with ESXi vSwitch version 6.0, release build
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.
45 VMware fusion does not have a menu option to change the default driver (e1000)
46 to the **vmxnet3** driver. VPP supports the **vmxnet3** driver.
48 These instructions describe how to change the e100 driver for VMware fusion.
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**
56 If 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
59 .. code-block:: console
61 # vppctl set interface rx-mode <interface> interrupt
67 To use the native VPP vmxnet3 driver use the following Steps
71 .. code-block:: console
73 $ sudo modprobe vfio-pci
75 For systems without IOMMU only, enable unsafe NOIOMMU mode
77 .. code-block:: console
79 $ echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
81 To bind interface to vfio-pci first install the :ref:`configutil`. This will download
82 the dpdk_devbind.py script. It is located in */usr/vpp/vpp-config/scripts* with Centos
83 and */usr/local/vpp/vpp-config/scripts* with Ubuntu.
85 Bind the driver with the following commands:
87 .. code-block:: console
89 $ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py -s
91 Network devices using DPDK-compatible driver
92 ============================================
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
102 $ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py --bind vfio-pci 0b:00.0
108 Now create the interface dynamically with following:
110 .. code-block:: console
112 $ sudo vppctl create interface vmxnet3 0000:0b:00.0
113 $ sudo set int state vmxnet3-0/b/0/0 up
118 If the interface needs to be deleted:
120 .. code-block:: console
122 $ sudo delete interface vmxnet3 <if-name>
127 Interface and ring information can be obtained with the command
128 **show vmxnet3 [if-name] [desc]**
132 .. code-block:: console
134 $ sudo vppctl show vmxnet
135 Interface: vmxnet3-0/b/0/0 (ifindex 1)
137 PCI Address: 0000:0b:00.0
138 Mac Address: 00:50:56:88:63:be
141 Number of interrupts: 2
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
148 TX completion next index 216
149 TX completion generation flag 0x0
150 size 4096 consume 216 produce 245