1 .. This work is licensed under a Creative Commons Attribution 4.0 International
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, Intel Corporation and others.
12 This project provides a placeholder for various sample VNF
13 (Virtual Network Function (:term:`VNF`)) development which includes example
14 reference architecture and optimization methods related to VNF/Network service
15 for high performance VNFs.
16 The sample VNFs are Open Source approximations* of Telco grade VNF’s using
17 optimized VNF + NFVi Infrastructure libraries, with Performance Characterization
18 of Sample† Traffic Flows.
22 * Not a commercial product. Encourage the community to contribute and close the feature gaps.
23 † No Vendor/Proprietary Workloads
25 SampleVNF supports installation directly in Ubuntu. The installation procedure
26 are detailed in the sections below.
28 The steps needed to run SampleVNF are:
29 1) Install and Build SampleVNF.
30 2) Deploy the VNF on the target and modify the config based on the Network under test
31 3) Run the traffic generator to generate the traffic.
38 The device under test (DUT) consists of a system following;
39 * A single or dual processor and PCH chip, except for System on Chip (SoC) cases
40 * DRAM memory size and frequency (normally single DIMM per channel)
41 * Specific Intel Network Interface Cards (NICs)
42 * BIOS settings noting those that updated from the basic settings
43 * DPDK build configuration settings, and commands used for tests
44 Connected to the DUT is an IXIA* or Software Traffic generator like pktgen or TRex,
45 simulation platform to generate packet traffic to the DUT ports and
46 determine the throughput/latency at the tester side.
48 Below are the supported/tested (:term:`VNF`) deployment type.
50 .. image:: images/deploy_type.png
52 :alt: SampleVNF supported topology
54 Hardware & Software Ingredients
55 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61 +-----------+------------------+
62 | Item | Description |
63 +-----------+------------------+
65 +-----------+------------------+
67 +-----------+------------------+
68 | OS | Ubuntu 16.04 LTS |
69 +-----------+------------------+
70 | kernel | 4.4.0-34-generic|
71 +-----------+------------------+
73 +-----------+------------------+
75 Boot and BIOS settings:
79 +------------------+---------------------------------------------------+
80 | Boot settings | default_hugepagesz=1G hugepagesz=1G hugepages=16 |
81 | | hugepagesz=2M hugepages=2048 isolcpus=1-11,22-33 |
82 | | nohz_full=1-11,22-33 rcu_nocbs=1-11,22-33 |
83 | | Note: nohz_full and rcu_nocbs is to disable Linux*|
84 | | kernel interrupts, and it’s import |
85 +------------------+---------------------------------------------------+
86 |BIOS | CPU Power and Performance Policy <Performance> |
87 | | CPU C-state Disabled |
88 | | CPU P-state Disabled |
89 | | Enhanced Intel® Speedstep® Tech Disabled |
90 | | Hyper-Threading Technology (If supported) Enable |
91 | | Virtualization Techology Enable |
92 | | Coherency Enable |
93 | | Turbo Boost Disabled |
94 +------------------+---------------------------------------------------+
96 Network Topology for testing VNFs
97 ---------------------------------
98 The ethernet cables should be connected between traffic generator and the VNF server (BM,
99 SRIOV or OVS) setup based on the test profile.
101 The connectivity could be
103 1) Single port pair : One pair ports used for traffic
107 e.g. Single port pair link0 and link1 of VNF are used
108 TG:port 0 <------> VNF:Port 0
109 TG:port 1 <------> VNF:Port 1
111 For correalted traffic, use below configuration
112 TG_1:port 0 <------> VNF:Port 0
113 VNF:Port 1 <------> TG_2:port 0 (UDP Replay)
114 (TG_2(UDP_Replay) reflects all the traffic on the given port)
116 2) Multi port pair : More than one pair of traffic
120 e.g. Two port pair link 0, link1, link2 and link3 of VNF are used
121 TG:port 0 <------> VNF:Port 0
122 TG:port 1 <------> VNF:Port 1
123 TG:port 2 <------> VNF:Port 2
124 TG:port 3 <------> VNF:Port 3
126 For correalted traffic, use below configuration
127 TG_1:port 0 <------> VNF:Port 0
128 VNF:Port 1 <------> TG_2:port 0 (UDP Replay)
129 TG_1:port 1 <------> VNF:Port 2
130 VNF:Port 3 <------> TG_2:port 1 (UDP Replay)
131 (TG_2(UDP_Replay) reflects all the traffic on the given port)
134 Refer: http://fast.dpdk.org/doc/pdf-guides/ to setup the DUT for VNF to run
136 * Standalone Virtualization - PHY-VM-PHY
138 Refer below link to setup sriov
139 https://software.intel.com/en-us/articles/using-sr-iov-to-share-an-ethernet-port-among-multiple-vms
142 Refer below link to setup ovs-dpdk
143 http://docs.openvswitch.org/en/latest/intro/install/general/
144 http://docs.openvswitch.org/en/latest/intro/install/dpdk/
147 Use any OPNFV installer to deploy the openstack.
150 Build VNFs on the DUT:
151 ----------------------
153 1) Clone sampleVNF project repository - git clone https://git.opnfv.org/samplevnf
155 Auto Build - Using script to build VNFs
156 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157 * Interactive options:
159 ./tools/vnf_build.sh -i
160 Follow the steps in the screen from option [1] –> [9] and
161 select option [8] to build the vnfs.
162 It will automatically download selected DPDK version and any
163 required patches and will setup everything and build VNFs.
165 Following are the options for setup:
166 ----------------------------------------------------------
167 Step 1: Environment setup.
168 ----------------------------------------------------------
169 [1] Check OS and network connection
170 [2] Select DPDK RTE version
172 ----------------------------------------------------------
173 Step 2: Download and Install
174 ----------------------------------------------------------
175 [3] Agree to download
176 [4] Download packages
177 [5] Download DPDK zip
178 [6] Build and Install DPDK
181 ----------------------------------------------------------
183 ----------------------------------------------------------
184 [8] Build all VNFs (vACL, vCGNAPT, vFW, UDP_Replay, DPPD-PROX)
188 * non-Interactive options:
190 ./tools/vnf_build.sh -s -d=<dpdk version eg 17.02>
196 1. Download DPDK supported version from dpdk.org
197 * http://dpdk.org/browse/dpdk/snapshot/dpdk-$DPDK_RTE_VER.zip
198 * unzip dpdk-$DPDK_RTE_VER.zip and apply dpdk patches only in case of 16.04 (Not required for other DPDK versions)
200 * make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
201 * cd x86_64-native-linuxapp-gcc
203 2. Add this to Go to /etc/default/grub configuration file to setup hugepages.
204 * Append “default_hugepagesz=1G hugepagesz=1G hugepages=8 hugepagesz=2M hugepages=2048” to the GRUB_CMDLINE_LINUX entry.
205 3. Setup Environment Variable
206 * export RTE_SDK=<samplevnf>/dpdk
207 * export RTE_TARGET=x86_64-native-linuxapp-gcc
208 * export VNF_CORE=<samplevnf> or using ./tools/setenv.sh
209 4. Build SampleVNFs e.g, vACL
210 * cd <samplevnf>/VNFs/vACL
213 * The vACL executable will be created at the following location
214 <samplevnf>/VNFs/vACL/build/vACL
216 2) Standalone virtualization/Openstack:
218 Build VM image from script in yardstick
220 1) git clone https://git.opnfv.org/samplevnf
221 2) cd samplevnf and run
222 ./tools/samplevnf-img-dpdk-samplevnf-modify tools/ubuntu-server-cloudimg-samplevnf-modify.sh
223 Image available in: /tmp/workspace/samplevnf/xenial-server-cloudimg-amd64-disk1.img
225 To run VNFs. Please refer chapter `05-How_to_run_SampleVNFs.rst`