3 The purpose of the VPP configuration utility is to allow the user to configure
\r
4 VPP in a simple and safe manner. The utility takes input from the user and
\r
5 then modifies the key configuration files. The user can then examine these files
\r
6 to be sure they are correct and then actually apply the configuration. The user
\r
7 can also install a released and stable version of VPP. This is currently
\r
8 released with release 17.10.
\r
12 The installation and executing of the VPP configuration utility is simple. First
\r
13 install the python pip module. Using pip install, then pip install vpp-config.
\r
14 Then simply type Òvpp-configÓ and answer the questions. If you are not sure what
\r
15 to answer choose the default. For yes or no questions the capital letter
\r
16 designates the default. For example, for a question that shows [Y/n] Y is the
\r
17 default. For numbers the default is within the brackets for example for a
\r
18 question that shows [1024]. 1024 is the default.
\r
20 The flow of the utility is to inspect the system, if VPP is not install it,
\r
21 create dry run configurations, inspect the files created during the dry run,
\r
22 apply the configuration and then inspect the system again and then repeat.
\r
26 - Supports Ubuntu, centos7, RedHat is coming shortly.
\r
30 Modifying the code is reasonable simple. The process would be edit and debug the
\r
31 code from the root directory. In order to do this, we need a script that will copy
\r
32 or data files to the proper place. This is where they end up with pip install. For
\r
33 Ubuntu, this is /usr/local/vpp/vpp-config. I have provided a script that will copy
\r
34 the relevant files correctly. I have also provided a script that will clean the
\r
35 environment so you can start from scratch. These are the steps to run the utility
\r
36 in this environment. The scripts are meant to be run from the root directory.
\r
39 ./scripts/cp-data.sh
\r
42 When the utility is installed with pip the wrapper scripts/vpp-config is written to
\r
43 /usr/local/bin. However, the starting point when debugging this script locally is
\r
44 ./vpp_config.py. Run the utility by executing ./vpp_config.py from the root directory.
\r
46 The start point in the code is in vpp_config.py. However, most of the work is done in
\r
47 the files in ./vpplib
\r
51 To upload this utility to PpPi simple do the following. Currently, I have my own account
\r
52 when we want everyone to contribute we will need to change that.
\r
56 python setup.py sdist bdist_wheel
\r
61 # pip install vpp-config
\r
64 Welcome to the VPP system configuration utility
\r
66 These are the files we will modify:
\r
67 /etc/vpp/startup.conf
\r
68 /etc/sysctl.d/80-vpp.conf
\r
71 Before we change them, we'll create working copies in /usr/local/vpp/vpp-config/dryrun
\r
72 Please inspect them carefully before applying the actual configuration (option 3)!
\r
74 What would you like to do?
\r
76 1) Show basic system information
\r
77 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
78 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
79 3) Full configuration (WARNING: This will change the system configuration)
\r
80 4) Install/Uninstall VPP.
\r
81 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
82 6) Install QEMU patch (Needed when running openstack).
\r
87 ==============================
\r
91 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
93 Thread(s) per core: 2
\r
94 Core(s) per socket: 8
\r
96 NUMA node0 CPU(s): 0-7,16-23
\r
97 NUMA node1 CPU(s): 8-15,24-31
\r
98 CPU max MHz: 3600.0000
\r
99 CPU min MHz: 1200.0000
\r
102 VPP Threads: (Name: Cpu Number)
\r
105 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
106 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
\r
109 Total System Memory : 65863484 kB
\r
110 Total Free Memory : 41325924 kB
\r
111 Actual Huge Page Total : 8192
\r
112 Configured Huge Page Total : 1024
\r
113 Huge Pages Free : 8192
\r
114 Huge Page Size : 2048 kB
\r
121 ==============================
\r
123 What would you like to do?
\r
125 1) Show basic system information
\r
126 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
127 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
128 3) Full configuration (WARNING: This will change the system configuration)
\r
129 4) Install/Uninstall VPP.
\r
130 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
131 6) Install QEMU patch (Needed when running openstack).
\r
136 There are no VPP packages on node localhost.
\r
137 Do you want to install VPP [Y/n]?
\r
138 INFO:root: Local Command: ls /etc/apt/sources.list.d/99fd.io.list.orig
\r
139 INFO:root: /etc/apt/sources.list.d/99fd.io.list.orig
\r
142 What would you like to do?
\r
144 1) Show basic system information
\r
145 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
146 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
147 3) Full configuration (WARNING: This will change the system configuration)
\r
148 4) Install/Uninstall VPP.
\r
149 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
150 6) Install QEMU patch (Needed when running openstack).
\r
155 ==============================
\r
159 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
161 Thread(s) per core: 2
\r
162 Core(s) per socket: 8
\r
164 NUMA node0 CPU(s): 0-7,16-23
\r
165 NUMA node1 CPU(s): 8-15,24-31
\r
166 CPU max MHz: 3600.0000
\r
167 CPU min MHz: 1200.0000
\r
170 VPP Threads: (Name: Cpu Number)
\r
175 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
176 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
\r
179 Total System Memory : 65863484 kB
\r
180 Total Free Memory : 55877364 kB
\r
181 Actual Huge Page Total : 1024
\r
182 Configured Huge Page Total : 1024
\r
183 Huge Pages Free : 1024
\r
184 Huge Page Size : 2048 kB
\r
187 Name Socket RXQs RXDescs TXQs TXDescs
\r
192 ==============================
\r
194 What would you like to do?
\r
196 1) Show basic system information
\r
197 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
198 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
199 3) Full configuration (WARNING: This will change the system configuration)
\r
200 4) Install/Uninstall VPP.
\r
201 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
202 6) Install QEMU patch (Needed when running openstack).
\r
207 These device(s) are currently NOT being used by VPP or the OS.
\r
209 PCI ID Description
\r
210 ----------------------------------------------------------------
\r
211 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
212 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
214 Would you like to give any of these devices back to the OS [y/N]? y
\r
215 Would you like to use device 0000:02:00.0 for the OS [y/N]? y
\r
216 Would you like to use device 0000:02:00.1 for the OS [y/N]? y
\r
218 These devices have kernel interfaces, but appear to be safe to use with VPP.
\r
220 PCI ID Kernel Interface(s) Description
\r
221 ------------------------------------------------------------------------------------------
\r
222 0000:90:00.0 enp144s0 VIC Ethernet NIC
\r
223 0000:8f:00.0 enp143s0 VIC Ethernet NIC
\r
224 0000:84:00.0 enp132s0f0,enp132s0f0d1 Ethernet Controller XL710 for 40GbE QSFP+
\r
225 0000:84:00.1 enp132s0f1,enp132s0f1d1 Ethernet Controller XL710 for 40GbE QSFP+
\r
226 0000:08:00.1 enp8s0f1 I350 Gigabit Network Connection
\r
227 0000:02:00.0 enp2s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
228 0000:02:00.1 enp2s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
229 0000:86:00.0 enp134s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
230 0000:86:00.1 enp134s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
232 Would you like to use any of these device(s) for VPP [y/N]? y
\r
233 Would you like to use device 0000:90:00.0 for VPP [y/N]?
\r
234 Would you like to use device 0000:8f:00.0 for VPP [y/N]?
\r
235 Would you like to use device 0000:84:00.0 for VPP [y/N]?
\r
236 Would you like to use device 0000:84:00.1 for VPP [y/N]?
\r
237 Would you like to use device 0000:08:00.1 for VPP [y/N]?
\r
238 Would you like to use device 0000:02:00.0 for VPP [y/N]? y
\r
239 Would you like to use device 0000:02:00.1 for VPP [y/N]? y
\r
240 Would you like to use device 0000:86:00.0 for VPP [y/N]? y
\r
241 Would you like to use device 0000:86:00.1 for VPP [y/N]? y
\r
243 These device(s) will be used by VPP.
\r
245 PCI ID Description
\r
246 ----------------------------------------------------------------
\r
247 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
248 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
249 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
250 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
252 Would you like to remove any of these device(s) [y/N]?
\r
254 These device(s) will be used by VPP, please rerun this option if this is incorrect.
\r
256 PCI ID Description
\r
257 ----------------------------------------------------------------
\r
258 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
259 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
260 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
261 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
263 Your system has 32 core(s) and 2 Numa Nodes.
\r
264 To begin, we suggest not reserving any cores for VPP or other processes.
\r
265 Then to improve performance try reserving cores as needed.
\r
267 How many core(s) do you want to reserve for processes other than VPP? [0-16][0]? 4
\r
268 How many core(s) shall we reserve for VPP workers[0-4][0]? 2
\r
269 Should we reserve 1 core for the VPP Main thread? [Y/n]?
\r
271 There currently 1024 2048 kB huge pages free.
\r
272 Do you want to reconfigure the number of huge pages [y/N]? y
\r
274 There currently a total of 1024 huge pages.
\r
275 How many huge pages do you want [1024 - 22511][1024]? 8192
\r
277 What would you like to do?
\r
279 1) Show basic system information
\r
280 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
281 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
282 3) Full configuration (WARNING: This will change the system configuration)
\r
283 4) Install/Uninstall VPP.
\r
284 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
285 6) Install QEMU patch (Needed when running openstack).
\r
290 We are now going to configure your system(s).
\r
292 Are you sure you want to do this [Y/n]?
\r
293 These are the changes we will apply to
\r
294 the huge page file (/etc/sysctl.d/80-vpp.conf).
\r
297 < # Number of 2MB hugepages desired
\r
298 < vm.nr_hugepages=1024
\r
300 < # Must be greater than or equal to (2 * vm.nr_hugepages).
\r
301 < vm.max_map_count=3096
\r
303 < # All groups allowed to access hugepages
\r
305 > vm.nr_hugepages=8192
\r
306 > vm.max_map_count=17408
\r
308 > kernel.shmmax=17179869184
\r
310 < # Shared Memory Max must be greator or equal to the total size of hugepages.
\r
311 < # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
\r
312 < # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
\r
313 < # is greater than the calculated TotalHugepageSize then set this parameter
\r
314 < # to current shmmax value.
\r
315 < kernel.shmmax=2147483648
\r
318 Are you sure you want to apply these changes [Y/n]?
\r
319 These are the changes we will apply to
\r
320 the VPP startup file (/etc/vpp/startup.conf).
\r
327 > cli-listen /run/vpp/cli.sock
\r
329 < ## In the VPP there is one main thread and optionally the user can create worker(s)
\r
333 > corelist-workers 9-10,5-6
\r
335 > scheduler-policy fifo
\r
336 > scheduler-priority 50
\r
338 > ## In the VPP there is one main thread and optionally the user can create worker(s)
\r
341 < ## Change default settings for all intefaces
\r
345 > dev 0000:86:00.0 {
\r
348 > dev 0000:86:00.1 {
\r
351 > dev 0000:02:00.0 {
\r
354 > dev 0000:02:00.1 {
\r
359 > ## Change default settings for all intefaces
\r
361 > ## Specify bonded interface and its slaves via PCI addresses
\r
363 > ## Bonded interface in XOR load balance mode (mode 2) with L3 and L4 headers
\r
364 > # vdev eth_bond0,mode=2,slave=0000:02:00.0,slave=0000:03:00.0,xmit_policy=l34
\r
365 > # vdev eth_bond1,mode=2,slave=0000:02:00.1,slave=0000:03:00.1,xmit_policy=l34
\r
367 > ## Bonded interface in Active-Back up mode (mode 1)
\r
368 > # vdev eth_bond0,mode=1,slave=0000:02:00.0,slave=0000:03:00.0
\r
369 > # vdev eth_bond1,mode=1,slave=0000:02:00.1,slave=0000:03:00.1
\r
379 Are you sure you want to apply these changes [Y/n]?
\r
381 The configured grub cmdline looks like this:
\r
382 GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable isolcpus=1-4,8,9-10,5-6 nohz_full=1-4,8,9-10,5-6 rcu_nocbs=1-4,8,9-10,5-6"
\r
384 The current boot cmdline looks like this:
\r
385 BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
387 Do you want to keep the current boot cmdline [Y/n]?
\r
389 What would you like to do?
\r
391 1) Show basic system information
\r
392 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
393 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
394 3) Full configuration (WARNING: This will change the system configuration)
\r
395 4) Install/Uninstall VPP.
\r
396 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
397 6) Install QEMU patch (Needed when running openstack).
\r
402 ==============================
\r
406 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
408 Thread(s) per core: 2
\r
409 Core(s) per socket: 8
\r
411 NUMA node0 CPU(s): 0-7,16-23
\r
412 NUMA node1 CPU(s): 8-15,24-31
\r
413 CPU max MHz: 3600.0000
\r
414 CPU min MHz: 1200.0000
\r
417 VPP Threads: (Name: Cpu Number)
\r
420 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
421 Configured: GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable isolcpus=1-4,8,9-10,5-6 nohz_full=1-4,8,9-10,5-6 rcu_nocbs=1-4,8,9-10,5-6"
\r
424 Total System Memory : 65863484 kB
\r
425 Total Free Memory : 41163916 kB
\r
426 Actual Huge Page Total : 8192
\r
427 Configured Huge Page Total : 8192
\r
428 Huge Pages Free : 3108
\r
429 Huge Page Size : 2048 kB
\r
432 Total Number of Buffers: 71680
\r
436 Sep 27 12:49:59 tf-ucs-3 vpp[13671]: EAL: No free hugepages reported in hugepages-1048576kB
\r
438 ==============================
\r
440 What would you like to do?
\r
442 1) Show basic system information
\r
443 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
444 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
445 3) Full configuration (WARNING: This will change the system configuration)
\r
446 4) Install/Uninstall VPP.
\r
447 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
448 6) Install QEMU patch (Needed when running openstack).
\r
453 ==============================
\r
457 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
459 Thread(s) per core: 2
\r
460 Core(s) per socket: 8
\r
462 NUMA node0 CPU(s): 0-7,16-23
\r
463 NUMA node1 CPU(s): 8-15,24-31
\r
464 CPU max MHz: 3600.0000
\r
465 CPU min MHz: 1200.0000
\r
468 VPP Threads: (Name: Cpu Number)
\r
477 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
478 Configured: GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable isolcpus=1-4,8,9-10,5-6 nohz_full=1-4,8,9-10,5-6 rcu_nocbs=1-4,8,9-10,5-6"
\r
481 Total System Memory : 65863484 kB
\r
482 Total Free Memory : 41170684 kB
\r
483 Actual Huge Page Total : 8192
\r
484 Configured Huge Page Total : 8192
\r
485 Huge Pages Free : 7936
\r
486 Huge Page Size : 2048 kB
\r
489 Total Number of Buffers: 71680
\r
490 Name Socket RXQs RXDescs TXQs TXDescs
\r
491 TenGigabitEthernet2/0/0 0 2 1024 5 1024
\r
492 TenGigabitEthernet2/0/1 0 2 1024 5 1024
\r
493 TenGigabitEthernet86/0/0 1 2 1024 5 1024
\r
494 TenGigabitEthernet86/0/1 1 2 1024 5 1024
\r
499 ==============================
\r
501 What would you like to do?
\r
503 1) Show basic system information
\r
504 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
505 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
506 3) Full configuration (WARNING: This will change the system configuration)
\r
507 4) Install/Uninstall VPP.
\r
508 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
509 6) Install QEMU patch (Needed when running openstack).
\r