1 VPP configuration utility
2 =========================
4 The purpose of the VPP configuration utility is to allow the user to configure
5 VPP in a simple and safe manner. The utility takes input from the user and
6 then modifies the key configuration files. The user can then examine these files
7 to be sure they are correct and then actually apply the configuration. The user
8 can also install a released and stable version of VPP. This is currently
9 released with release 17.10.
14 The installation and executing of the VPP configuration utility is simple. First
15 install the python pip module. Using pip install, then pip install vpp-config.
16 Then simply type ``vpp-config`` and answer the questions. If you are not sure what
17 to answer choose the default. For yes or no questions the capital letter
18 designates the default. For example, for a question that shows [Y/n] Y is the
19 default. For numbers the default is within the brackets for example for a
20 question that shows [1024]. 1024 is the default.
22 The flow of the utility is to inspect the system, if VPP is not install it,
23 create dry run configurations, inspect the files created during the dry run,
24 apply the configuration and then inspect the system again and then repeat.
29 - Supports Ubuntu, centos7, RedHat is coming shortly.
33 Modifying the code is reasonable simple. The process would be edit and debug the
34 code from the root directory. In order to do this, we need a script that will copy
35 or data files to the proper place. This is where they end up with pip install. For
36 Ubuntu, this is ``/usr/local/vpp/vpp-config``. I have provided a script that will copy
37 the relevant files correctly. I have also provided a script that will clean the
38 environment so you can start from scratch. These are the steps to run the utility
39 in this environment. The scripts are meant to be run from the root directory.
41 .. code-block:: console
47 When the utility is installed with pip the wrapper ``scripts/vpp-config`` is written to
48 ``/usr/local/bin``. However, the starting point when debugging this script locally is
49 vpp-config. Run the utility by executing vpp-config.
51 The start point in the code is in vpp_config.py. However, most of the work is
52 done in the files in ``./vpplib``
57 To upload this utility to PpPi simple do the following. Currently, I have my own account
58 when we want everyone to contribute we will need to change that.
61 .. code-block:: console
65 python setup.py sdist bdist_wheel
70 .. code-block:: console
72 # pip install vpp-config
75 Welcome to the VPP system configuration utility
77 These are the files we will modify:
80 /etc/sysctl.d/80-vpp.conf
83 Before we change them, we'll create working copies in ``/usr/local/vpp/vpp-config/dryrun``
84 Please inspect them carefully before applying the actual configuration (option 3)!
86 What would you like to do?
88 1) Show basic system information
89 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
90 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
91 3) Full configuration (WARNING: This will change the system configuration)
92 4) Install/Uninstall VPP.
93 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
94 6) Install QEMU patch (Needed when running openstack).
102 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
104 Thread(s) per core: 2
105 Core(s) per socket: 8
107 NUMA node0 CPU(s): 0-7,16-23
108 NUMA node1 CPU(s): 8-15,24-31
109 CPU max MHz: 3600.0000
110 CPU min MHz: 1200.0000
113 VPP Threads: (Name: Cpu Number)
116 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
117 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
120 Total System Memory : 65863484 kB
121 Total Free Memory : 41325924 kB
122 Actual Huge Page Total : 8192
123 Configured Huge Page Total : 1024
124 Huge Pages Free : 8192
125 Huge Page Size : 2048 kB
132 What would you like to do?
134 1) Show basic system information
135 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
136 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
137 3) Full configuration (WARNING: This will change the system configuration)
138 4) Install/Uninstall VPP.
139 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
140 6) Install QEMU patch (Needed when running openstack).
145 There are no VPP packages on node localhost.
146 Do you want to install VPP [Y/n]?
147 INFO:root: Local Command: ls /etc/apt/sources.list.d/99fd.io.list.orig
148 INFO:root: /etc/apt/sources.list.d/99fd.io.list.orig
150 What would you like to do?
152 1) Show basic system information
153 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
154 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
155 3) Full configuration (WARNING: This will change the system configuration)
156 4) Install/Uninstall VPP.
157 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
158 6) Install QEMU patch (Needed when running openstack).
163 ==============================
167 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
169 Thread(s) per core: 2
170 Core(s) per socket: 8
172 NUMA node0 CPU(s): 0-7,16-23
173 NUMA node1 CPU(s): 8-15,24-31
174 CPU max MHz: 3600.0000
175 CPU min MHz: 1200.0000
178 VPP Threads: (Name: Cpu Number)
183 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
184 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
187 Total System Memory : 65863484 kB
188 Total Free Memory : 55877364 kB
189 Actual Huge Page Total : 1024
190 Configured Huge Page Total : 1024
191 Huge Pages Free : 1024
192 Huge Page Size : 2048 kB
195 Name Socket RXQs RXDescs TXQs TXDescs
200 ==============================
202 What would you like to do?
204 1) Show basic system information
205 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
206 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
207 3) Full configuration (WARNING: This will change the system configuration)
208 4) Install/Uninstall VPP.
209 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
210 6) Install QEMU patch (Needed when running openstack).
215 These device(s) are currently NOT being used by VPP or the OS.
218 ----------------------------------------------------------------
219 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
220 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
222 Would you like to give any of these devices back to the OS [y/N]? y
223 Would you like to use device 0000:02:00.0 for the OS [y/N]? y
224 Would you like to use device 0000:02:00.1 for the OS [y/N]? y
226 These devices have kernel interfaces, but appear to be safe to use with VPP.
228 PCI ID Kernel Interface(s) Description
229 ------------------------------------------------------------------------------------------
230 0000:90:00.0 enp144s0 VIC Ethernet NIC
231 0000:8f:00.0 enp143s0 VIC Ethernet NIC
232 0000:84:00.0 enp132s0f0,enp132s0f0d1 Ethernet Controller XL710 for 40GbE QSFP+
233 0000:84:00.1 enp132s0f1,enp132s0f1d1 Ethernet Controller XL710 for 40GbE QSFP+
234 0000:08:00.1 enp8s0f1 I350 Gigabit Network Connection
235 0000:02:00.0 enp2s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
236 0000:02:00.1 enp2s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
237 0000:86:00.0 enp134s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
238 0000:86:00.1 enp134s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
240 Would you like to use any of these device(s) for VPP [y/N]? y
241 Would you like to use device 0000:90:00.0 for VPP [y/N]?
242 Would you like to use device 0000:8f:00.0 for VPP [y/N]?
243 Would you like to use device 0000:84:00.0 for VPP [y/N]?
244 Would you like to use device 0000:84:00.1 for VPP [y/N]?
245 Would you like to use device 0000:08:00.1 for VPP [y/N]?
246 Would you like to use device 0000:02:00.0 for VPP [y/N]? y
247 Would you like to use device 0000:02:00.1 for VPP [y/N]? y
248 Would you like to use device 0000:86:00.0 for VPP [y/N]? y
249 Would you like to use device 0000:86:00.1 for VPP [y/N]? y
252 ----------------------------------------------------------------
253 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
254 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
255 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
256 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
258 Would you like to remove any of these device(s) [y/N]?
260 These device(s) will be used by VPP, please rerun this option if this is incorrect.
263 ----------------------------------------------------------------
264 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
265 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
266 0000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
267 0000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
269 Your system has 32 core(s) and 2 Numa Nodes.
270 To begin, we suggest not reserving any cores for VPP or other processes.
271 Then to improve performance try reserving cores as needed.
273 How many core(s) do you want to reserve for processes other than VPP? [0-16][0]? 4
274 How many core(s) shall we reserve for VPP workers[0-4][0]? 2
275 Should we reserve 1 core for the VPP Main thread? [Y/n]?
277 There currently 1024 2048 kB huge pages free.
278 Do you want to reconfigure the number of huge pages [y/N]? y
280 There currently a total of 1024 huge pages.
281 How many huge pages do you want [1024 - 22511][1024]? 8192
283 What would you like to do?
285 1) Show basic system information
286 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
287 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
288 3) Full configuration (WARNING: This will change the system configuration)
289 4) Install/Uninstall VPP.
290 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
291 6) Install QEMU patch (Needed when running openstack).
296 We are now going to configure your system(s).
298 Are you sure you want to do this [Y/n]?
299 These are the changes we will apply to
300 the huge page file (/etc/sysctl.d/80-vpp.conf).
303 < # Number of 2MB hugepages desired
304 < vm.nr_hugepages=1024
306 < # Must be greater than or equal to (2 * vm.nr_hugepages).
307 < vm.max_map_count=3096
309 < # All groups allowed to access hugepages
311 > vm.nr_hugepages=8192
312 > vm.max_map_count=17408
314 > kernel.shmmax=17179869184
316 < # Shared Memory Max must be greator or equal to the total size of hugepages.
317 < # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
318 < # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
319 < # is greater than the calculated TotalHugepageSize then set this parameter
320 < # to current shmmax value.
321 < kernel.shmmax=2147483648
323 Are you sure you want to apply these changes [Y/n]?
324 These are the changes we will apply to
325 the VPP startup file (/etc/vpp/startup.conf).
332 > cli-listen /run/vpp/cli.sock
334 < ## In the VPP there is one main thread and optionally the user can create worker(s)
338 > corelist-workers 9-10,5-6
340 > scheduler-policy fifo
341 > scheduler-priority 50
343 > ## In the VPP there is one main thread and optionally the user can create worker(s)
346 < ## Change default settings for all intefaces
364 > ## Change default settings for all intefaces
366 > ## Specify bonded interface and its slaves via PCI addresses
368 > ## Bonded interface in XOR load balance mode (mode 2) with L3 and L4 headers
369 > # vdev eth_bond0,mode=2,slave=0000:02:00.0,slave=0000:03:00.0,xmit_policy=l34
370 > # vdev eth_bond1,mode=2,slave=0000:02:00.1,slave=0000:03:00.1,xmit_policy=l34
372 > ## Bonded interface in Active-Back up mode (mode 1)
373 > # vdev eth_bond0,mode=1,slave=0000:02:00.0,slave=0000:03:00.0
374 > # vdev eth_bond1,mode=1,slave=0000:02:00.1,slave=0000:03:00.1
383 Are you sure you want to apply these changes [Y/n]?
385 The configured grub cmdline looks like this:
386 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"
388 The current boot cmdline looks like this:
389 BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
391 Do you want to keep the current boot cmdline [Y/n]?
393 What would you like to do?
395 1) Show basic system information
396 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
397 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
398 3) Full configuration (WARNING: This will change the system configuration)
399 4) Install/Uninstall VPP.
400 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
401 6) Install QEMU patch (Needed when running openstack).
406 ==============================
410 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
412 Thread(s) per core: 2
413 Core(s) per socket: 8
415 NUMA node0 CPU(s): 0-7,16-23
416 NUMA node1 CPU(s): 8-15,24-31
417 CPU max MHz: 3600.0000
418 CPU min MHz: 1200.0000
421 VPP Threads: (Name: Cpu Number)
424 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
425 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"
428 Total System Memory : 65863484 kB
429 Total Free Memory : 41163916 kB
430 Actual Huge Page Total : 8192
431 Configured Huge Page Total : 8192
432 Huge Pages Free : 3108
433 Huge Page Size : 2048 kB
436 Total Number of Buffers: 71680
440 Sep 27 12:49:59 tf-ucs-3 vpp[13671]: EAL: No free hugepages reported in hugepages-1048576kB
442 ==============================
444 What would you like to do?
446 1) Show basic system information
447 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
448 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
449 3) Full configuration (WARNING: This will change the system configuration)
450 4) Install/Uninstall VPP.
451 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
452 6) Install QEMU patch (Needed when running openstack).
457 ==============================
461 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
463 Thread(s) per core: 2
464 Core(s) per socket: 8
466 NUMA node0 CPU(s): 0-7,16-23
467 NUMA node1 CPU(s): 8-15,24-31
468 CPU max MHz: 3600.0000
469 CPU min MHz: 1200.0000
472 VPP Threads: (Name: Cpu Number)
481 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
482 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"
485 Total System Memory : 65863484 kB
486 Total Free Memory : 41170684 kB
487 Actual Huge Page Total : 8192
488 Configured Huge Page Total : 8192
489 Huge Pages Free : 7936
490 Huge Page Size : 2048 kB
493 Total Number of Buffers: 71680
494 Name Socket RXQs RXDescs TXQs TXDescs
495 TenGigabitEthernet2/0/0 0 2 1024 5 1024
496 TenGigabitEthernet2/0/1 0 2 1024 5 1024
497 TenGigabitEthernet86/0/0 1 2 1024 5 1024
498 TenGigabitEthernet86/0/1 1 2 1024 5 1024
503 ==============================
505 What would you like to do?
507 1) Show basic system information
508 2) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
509 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
510 3) Full configuration (WARNING: This will change the system configuration)
511 4) Install/Uninstall VPP.
512 5) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
513 6) Install QEMU patch (Needed when running openstack).