FIB: encode the label stack in the FIB path during table dump
[vpp.git] / docs / usecases / vmxnet3.rst
1 .. _vmxnet3:
2
3 VPP with VMware/Vmxnet3
4 =======================
5
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.
8
9 Advantages
10 ----------
11
12 The native VPP native vmxnet3 driver provides the following features
13 that are not provided with the standard dpdk vmxnet3 driver.
14
15 -  Interrupt mode
16 -  Adaptive mode
17 -  TSO/LRO mode
18
19 Does not support
20 ----------------
21
22 This driver does yet support the following features.
23
24 -  NUMA support
25 -  RSS/multiple queues
26 -  VLAN filter
27
28 Prerequisites
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
42 System setup
43 ~~~~~~~~~~~~
44
45 To use the native VPP vmxnet3 driver use the following Steps
46
47 Load VFIO driver
48
49 .. code-block:: console
50
51     $ sudo modprobe vfio-pci
52
53 For systems without IOMMU only, enable unsafe NOIOMMU mode
54
55 .. code-block:: console
56
57     $ echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
58
59 To bind interface to vfio-pci first install the :ref:`configutil`. This will download
60 the dpdk_devbind.py script. It is located in */usr/vpp/vpp-config/scripts* with Centos
61 and */usr/local/vpp/vpp-config/scripts* with Ubuntu. 
62
63 Bind the driver with the following commands:
64
65 .. code-block:: console
66
67     $ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py -s
68
69     Network devices using DPDK-compatible driver
70     ============================================
71     <none>
72     
73     Network devices using kernel driver
74     ===================================
75     0000:03:00.0 'VMXNET3 Ethernet Controller' if=ens160 drv=vmxnet3 unused=vfio-pci,uio_pci_generic 
76     0000:0b:00.0 'VMXNET3 Ethernet Controller' drv=vfio-pci unused=vmxnet3,uio_pci_generic
77     0000:13:00.0 'VMXNET3 Ethernet Controller' drv=vfio-pci unused=vmxnet3,uio_pci_generic
78     .....
79
80     $ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py --bind vfio-pci 0b:00.0
81
82
83 Interface Creation
84 ~~~~~~~~~~~~~~~~~~
85
86 Now create the interface dynamically with following:
87
88 .. code-block:: console
89
90     $ sudo vppctl create interface vmxnet3 0000:0b:00.0
91     $ sudo set int state vmxnet3-0/b/0/0 up
92
93 Interface Deletion
94 ~~~~~~~~~~~~~~~~~~
95
96 If the interface needs to be deleted:
97
98 .. code-block:: console
99
100     $ sudo delete interface vmxnet3 <if-name>
101
102 Show vmxnet3
103 ~~~~~~~~~~~~
104
105 Interface and ring information can be obtained with the command
106 **show vmxnet3 [if-name] [desc]**
107
108 For example:
109
110 .. code-block:: console
111
112     $ sudo vppctl show vmxnet
113     Interface: vmxnet3-0/b/0/0 (ifindex 1)
114       Version: 1
115       PCI Address: 0000:0b:00.0
116       Mac Address: 00:50:56:88:63:be
117       hw if index: 1
118       Device instance: 0
119       Number of interrupts: 2
120       Queue 0 (RX)
121         RX completion next index 786
122         RX completion generation flag 0x80000000
123         ring 0 size 4096 fill 4094 consume 785 produce 784
124         ring 1 size 4096 fill 4096 consume 0 produce 0
125       Queue 0 (TX)
126         TX completion next index 216
127         TX completion generation flag 0x0
128         size 4096 consume 216 produce 245