NFVBENCH-161 NFVbench --force-cleanup deletes more ports than needed
[nfvbench.git] / docs / testing / user / userguide / hw_requirements.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. (c) Cisco Systems, Inc
4
5 Requirements for running NFVbench
6 =================================
7
8 .. _requirements:
9
10 Hardware Requirements
11 ---------------------
12 To run NFVbench you need the following hardware:
13 - a Linux server
14 - a DPDK compatible NIC with at least 2 ports (preferably 10Gbps or higher)
15 - 2 ethernet cables between the NIC and the OpenStack pod under test (usually through a top of rack switch)
16
17 The DPDK-compliant NIC must be one supported by the TRex traffic generator (such as Intel X710, 
18 refer to the Trex Installation Guide for a complete list of supported NIC)
19
20 To run the TRex traffic generator (that is bundled with NFVbench) you will need to wire 2 physical interfaces of the NIC to the TOR switch(es):
21     - if you have only 1 TOR, wire both interfaces to that same TOR
22     - 1 interface to each TOR if you have 2 TORs and want to use bonded links to your compute nodes
23
24 .. image:: images/nfvbench-trex-setup.png
25
26
27 Switch Configuration
28 --------------------
29 The 2 corresponding ports on the switch(es) facing the Trex ports on the Linux server should be configured in trunk mode (NFVbench will instruct TRex to insert the appropriate vlan tag).
30
31 Using a TOR switch is more representative of a real deployment and allows to measure packet flows on any compute node in the rack without rewiring and includes the overhead of the TOR switch.
32
33 Although not the primary targeted use case, NFVbench could also support the direct wiring of the traffic generator to
34 a compute node without a switch.
35
36 Software Requirements
37 ---------------------
38
39 You need Docker to be installed on the Linux server.
40
41 TRex uses the DPDK interface to interact with the DPDK compatible NIC for sending and receiving frames. The Linux server will
42 need to be configured properly to enable DPDK.
43
44 DPDK requires a uio (User space I/O) or vfio (Virtual Function I/O) kernel module to be installed on the host to work.
45 There are 2 main uio kernel modules implementations (igb_uio and uio_pci_generic) and one vfio kernel module implementation.
46
47 To check if a uio or vfio is already loaded on the host:
48
49 .. code-block:: bash
50
51     lsmod | grep -e igb_uio -e uio_pci_generic -e vfio
52
53
54 If missing, it is necessary to install a uio/vfio kernel module on the host server:
55
56 - find a suitable kernel module for your host server (any uio or vfio kernel module built with the same Linux kernel version should work)
57 - load it using the modprobe and insmod commands
58
59 Example of installation of the igb_uio kernel module:
60
61 .. code-block:: bash
62
63     modprobe uio
64     insmod ./igb_uio.ko
65
66 Finally, the correct iommu options and huge pages to be configured on the Linux server on the boot command line:
67
68 - enable intel_iommu and iommu pass through: "intel_iommu=on iommu=pt"
69 - for Trex, pre-allocate 1024 huge pages of 2MB each (for a total of 2GB): "hugepagesz=2M hugepages=1024"
70
71 More detailed instructions can be found in the DPDK documentation (https://buildmedia.readthedocs.org/media/pdf/dpdk/latest/dpdk.pdf).