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. Run the utility by executing vpp-config.
\r
46 The start point in the code is in vpp_config.py. However, most of the work is
\r
48 the files in ./vpplib
\r
52 To upload this utility to PpPi simple do the following. Currently, I have my own account
\r
53 when we want everyone to contribute we will need to change that.
\r
57 python setup.py sdist bdist_wheel
\r
62 # pip install vpp-config
\r
65 Welcome to the VPP system configuration utility
\r
67 These are the files we will modify:
\r
68 /etc/vpp/startup.conf
\r
69 /etc/sysctl.d/80-vpp.conf
\r
72 Before we change them, we'll create working copies in /usr/local/vpp/vpp-config/dryrun
\r
73 Please inspect them carefully before applying the actual configuration (option 3)!
\r
75 What would you like to do?
\r
77 1) Show basic system information
\r
78 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
79 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
80 3) Full configuration (WARNING: This will change the system configuration)
\r
81 4) Install/Uninstall VPP.
\r
82 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
83 6) Install QEMU patch (Needed when running openstack).
\r
88 ==============================
\r
92 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
94 Thread(s) per core: 2
\r
95 Core(s) per socket: 8
\r
97 NUMA node0 CPU(s): 0-7,16-23
\r
98 NUMA node1 CPU(s): 8-15,24-31
\r
99 CPU max MHz: 3600.0000
\r
100 CPU min MHz: 1200.0000
\r
103 VPP Threads: (Name: Cpu Number)
\r
106 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
107 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
\r
110 Total System Memory : 65863484 kB
\r
111 Total Free Memory : 41325924 kB
\r
112 Actual Huge Page Total : 8192
\r
113 Configured Huge Page Total : 1024
\r
114 Huge Pages Free : 8192
\r
115 Huge Page Size : 2048 kB
\r
122 ==============================
\r
124 What would you like to do?
\r
126 1) Show basic system information
\r
127 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
128 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
129 3) Full configuration (WARNING: This will change the system configuration)
\r
130 4) Install/Uninstall VPP.
\r
131 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
132 6) Install QEMU patch (Needed when running openstack).
\r
137 There are no VPP packages on node localhost.
\r
138 Do you want to install VPP [Y/n]?
\r
139 INFO:root: Local Command: ls /etc/apt/sources.list.d/99fd.io.list.orig
\r
140 INFO:root: /etc/apt/sources.list.d/99fd.io.list.orig
\r
143 What would you like to do?
\r
145 1) Show basic system information
\r
146 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
147 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
148 3) Full configuration (WARNING: This will change the system configuration)
\r
149 4) Install/Uninstall VPP.
\r
150 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
151 6) Install QEMU patch (Needed when running openstack).
\r
156 ==============================
\r
160 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
162 Thread(s) per core: 2
\r
163 Core(s) per socket: 8
\r
165 NUMA node0 CPU(s): 0-7,16-23
\r
166 NUMA node1 CPU(s): 8-15,24-31
\r
167 CPU max MHz: 3600.0000
\r
168 CPU min MHz: 1200.0000
\r
171 VPP Threads: (Name: Cpu Number)
\r
176 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
177 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
\r
180 Total System Memory : 65863484 kB
\r
181 Total Free Memory : 55877364 kB
\r
182 Actual Huge Page Total : 1024
\r
183 Configured Huge Page Total : 1024
\r
184 Huge Pages Free : 1024
\r
185 Huge Page Size : 2048 kB
\r
188 Name Socket RXQs RXDescs TXQs TXDescs
\r
193 ==============================
\r
195 What would you like to do?
\r
197 1) Show basic system information
\r
198 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
199 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
200 3) Full configuration (WARNING: This will change the system configuration)
\r
201 4) Install/Uninstall VPP.
\r
202 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
203 6) Install QEMU patch (Needed when running openstack).
\r
208 These device(s) are currently NOT being used by VPP or the OS.
\r
210 PCI ID Description
\r
211 ----------------------------------------------------------------
\r
212 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
213 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
215 Would you like to give any of these devices back to the OS [y/N]? y
\r
216 Would you like to use device 0000:02:00.0 for the OS [y/N]? y
\r
217 Would you like to use device 0000:02:00.1 for the OS [y/N]? y
\r
219 These devices have kernel interfaces, but appear to be safe to use with VPP.
\r
221 PCI ID Kernel Interface(s) Description
\r
222 ------------------------------------------------------------------------------------------
\r
223 0000:90:00.0 enp144s0 VIC Ethernet NIC
\r
224 0000:8f:00.0 enp143s0 VIC Ethernet NIC
\r
225 0000:84:00.0 enp132s0f0,enp132s0f0d1 Ethernet Controller XL710 for 40GbE QSFP+
\r
226 0000:84:00.1 enp132s0f1,enp132s0f1d1 Ethernet Controller XL710 for 40GbE QSFP+
\r
227 0000:08:00.1 enp8s0f1 I350 Gigabit Network Connection
\r
228 0000:02:00.0 enp2s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
229 0000:02:00.1 enp2s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
230 0000:86:00.0 enp134s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
231 0000:86:00.1 enp134s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
233 Would you like to use any of these device(s) for VPP [y/N]? y
\r
234 Would you like to use device 0000:90:00.0 for VPP [y/N]?
\r
235 Would you like to use device 0000:8f:00.0 for VPP [y/N]?
\r
236 Would you like to use device 0000:84:00.0 for VPP [y/N]?
\r
237 Would you like to use device 0000:84:00.1 for VPP [y/N]?
\r
238 Would you like to use device 0000:08:00.1 for VPP [y/N]?
\r
239 Would you like to use device 0000:02:00.0 for VPP [y/N]? y
\r
240 Would you like to use device 0000:02:00.1 for VPP [y/N]? y
\r
241 Would you like to use device 0000:86:00.0 for VPP [y/N]? y
\r
242 Would you like to use device 0000:86:00.1 for VPP [y/N]? y
\r
244 These device(s) will be used by VPP.
\r
246 PCI ID Description
\r
247 ----------------------------------------------------------------
\r
248 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
249 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
250 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
251 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
253 Would you like to remove any of these device(s) [y/N]?
\r
255 These device(s) will be used by VPP, please rerun this option if this is incorrect.
\r
257 PCI ID Description
\r
258 ----------------------------------------------------------------
\r
259 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
260 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
261 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
262 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
\r
264 Your system has 32 core(s) and 2 Numa Nodes.
\r
265 To begin, we suggest not reserving any cores for VPP or other processes.
\r
266 Then to improve performance try reserving cores as needed.
\r
268 How many core(s) do you want to reserve for processes other than VPP? [0-16][0]? 4
\r
269 How many core(s) shall we reserve for VPP workers[0-4][0]? 2
\r
270 Should we reserve 1 core for the VPP Main thread? [Y/n]?
\r
272 There currently 1024 2048 kB huge pages free.
\r
273 Do you want to reconfigure the number of huge pages [y/N]? y
\r
275 There currently a total of 1024 huge pages.
\r
276 How many huge pages do you want [1024 - 22511][1024]? 8192
\r
278 What would you like to do?
\r
280 1) Show basic system information
\r
281 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
282 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
283 3) Full configuration (WARNING: This will change the system configuration)
\r
284 4) Install/Uninstall VPP.
\r
285 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
286 6) Install QEMU patch (Needed when running openstack).
\r
291 We are now going to configure your system(s).
\r
293 Are you sure you want to do this [Y/n]?
\r
294 These are the changes we will apply to
\r
295 the huge page file (/etc/sysctl.d/80-vpp.conf).
\r
298 < # Number of 2MB hugepages desired
\r
299 < vm.nr_hugepages=1024
\r
301 < # Must be greater than or equal to (2 * vm.nr_hugepages).
\r
302 < vm.max_map_count=3096
\r
304 < # All groups allowed to access hugepages
\r
306 > vm.nr_hugepages=8192
\r
307 > vm.max_map_count=17408
\r
309 > kernel.shmmax=17179869184
\r
311 < # Shared Memory Max must be greator or equal to the total size of hugepages.
\r
312 < # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
\r
313 < # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
\r
314 < # is greater than the calculated TotalHugepageSize then set this parameter
\r
315 < # to current shmmax value.
\r
316 < kernel.shmmax=2147483648
\r
319 Are you sure you want to apply these changes [Y/n]?
\r
320 These are the changes we will apply to
\r
321 the VPP startup file (/etc/vpp/startup.conf).
\r
328 > cli-listen /run/vpp/cli.sock
\r
330 < ## In the VPP there is one main thread and optionally the user can create worker(s)
\r
334 > corelist-workers 9-10,5-6
\r
336 > scheduler-policy fifo
\r
337 > scheduler-priority 50
\r
339 > ## In the VPP there is one main thread and optionally the user can create worker(s)
\r
342 < ## Change default settings for all intefaces
\r
346 > dev 0000:86:00.0 {
\r
349 > dev 0000:86:00.1 {
\r
352 > dev 0000:02:00.0 {
\r
355 > dev 0000:02:00.1 {
\r
360 > ## Change default settings for all intefaces
\r
362 > ## Specify bonded interface and its slaves via PCI addresses
\r
364 > ## Bonded interface in XOR load balance mode (mode 2) with L3 and L4 headers
\r
365 > # vdev eth_bond0,mode=2,slave=0000:02:00.0,slave=0000:03:00.0,xmit_policy=l34
\r
366 > # vdev eth_bond1,mode=2,slave=0000:02:00.1,slave=0000:03:00.1,xmit_policy=l34
\r
368 > ## Bonded interface in Active-Back up mode (mode 1)
\r
369 > # vdev eth_bond0,mode=1,slave=0000:02:00.0,slave=0000:03:00.0
\r
370 > # vdev eth_bond1,mode=1,slave=0000:02:00.1,slave=0000:03:00.1
\r
380 Are you sure you want to apply these changes [Y/n]?
\r
382 The configured grub cmdline looks like this:
\r
383 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
385 The current boot cmdline looks like this:
\r
386 BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
388 Do you want to keep the current boot cmdline [Y/n]?
\r
390 What would you like to do?
\r
392 1) Show basic system information
\r
393 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
394 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
395 3) Full configuration (WARNING: This will change the system configuration)
\r
396 4) Install/Uninstall VPP.
\r
397 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
398 6) Install QEMU patch (Needed when running openstack).
\r
403 ==============================
\r
407 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
409 Thread(s) per core: 2
\r
410 Core(s) per socket: 8
\r
412 NUMA node0 CPU(s): 0-7,16-23
\r
413 NUMA node1 CPU(s): 8-15,24-31
\r
414 CPU max MHz: 3600.0000
\r
415 CPU min MHz: 1200.0000
\r
418 VPP Threads: (Name: Cpu Number)
\r
421 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
422 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
425 Total System Memory : 65863484 kB
\r
426 Total Free Memory : 41163916 kB
\r
427 Actual Huge Page Total : 8192
\r
428 Configured Huge Page Total : 8192
\r
429 Huge Pages Free : 3108
\r
430 Huge Page Size : 2048 kB
\r
433 Total Number of Buffers: 71680
\r
437 Sep 27 12:49:59 tf-ucs-3 vpp[13671]: EAL: No free hugepages reported in hugepages-1048576kB
\r
439 ==============================
\r
441 What would you like to do?
\r
443 1) Show basic system information
\r
444 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
445 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
446 3) Full configuration (WARNING: This will change the system configuration)
\r
447 4) Install/Uninstall VPP.
\r
448 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
449 6) Install QEMU patch (Needed when running openstack).
\r
454 ==============================
\r
458 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
\r
460 Thread(s) per core: 2
\r
461 Core(s) per socket: 8
\r
463 NUMA node0 CPU(s): 0-7,16-23
\r
464 NUMA node1 CPU(s): 8-15,24-31
\r
465 CPU max MHz: 3600.0000
\r
466 CPU min MHz: 1200.0000
\r
469 VPP Threads: (Name: Cpu Number)
\r
478 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
\r
479 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
482 Total System Memory : 65863484 kB
\r
483 Total Free Memory : 41170684 kB
\r
484 Actual Huge Page Total : 8192
\r
485 Configured Huge Page Total : 8192
\r
486 Huge Pages Free : 7936
\r
487 Huge Page Size : 2048 kB
\r
490 Total Number of Buffers: 71680
\r
491 Name Socket RXQs RXDescs TXQs TXDescs
\r
492 TenGigabitEthernet2/0/0 0 2 1024 5 1024
\r
493 TenGigabitEthernet2/0/1 0 2 1024 5 1024
\r
494 TenGigabitEthernet86/0/0 1 2 1024 5 1024
\r
495 TenGigabitEthernet86/0/1 1 2 1024 5 1024
\r
500 ==============================
\r
502 What would you like to do?
\r
504 1) Show basic system information
\r
505 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
\r
506 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
\r
507 3) Full configuration (WARNING: This will change the system configuration)
\r
508 4) Install/Uninstall VPP.
\r
509 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
\r
510 6) Install QEMU patch (Needed when running openstack).
\r