blob: ec9c8e46cf416b9861cfa055772ad5669f774be4 [file] [log] [blame]
John DeNisco68b0ee32017-09-27 16:35:23 -04001Summary:
2
3The purpose of the VPP configuration utility is to allow the user to configure
4VPP in a simple and safe manner. The utility takes input from the user and
5then modifies the key configuration files. The user can then examine these files
6to be sure they are correct and then actually apply the configuration. The user
7can also install a released and stable version of VPP. This is currently
John DeNiscoc6b2a202017-11-01 12:37:47 -04008released with release 17.10.
John DeNisco68b0ee32017-09-27 16:35:23 -04009
10Use:
11
12The installation and executing of the VPP configuration utility is simple. First
13install the python pip module. Using pip install, then pip install vpp-config.
14Then simply type Òvpp-configÓ and answer the questions. If you are not sure what
15to answer choose the default. For yes or no questions the capital letter
16designates the default. For example, for a question that shows [Y/n] Y is the
17default. For numbers the default is within the brackets for example for a
18question that shows [1024]. 1024 is the default.
19
20The flow of the utility is to inspect the system, if VPP is not install it,
21create dry run configurations, inspect the files created during the dry run,
22apply the configuration and then inspect the system again and then repeat.
23
24Caveats:
25
John DeNiscoc6b2a202017-11-01 12:37:47 -040026- Supports Ubuntu, centos7, RedHat is coming shortly.
John DeNisco68b0ee32017-09-27 16:35:23 -040027
28For Developers:
29
30Modifying the code is reasonable simple. The process would be edit and debug the
31code from the root directory. In order to do this, we need a script that will copy
32or data files to the proper place. This is where they end up with pip install. For
33Ubuntu, this is /usr/local/vpp/vpp-config. I have provided a script that will copy
34the relevant files correctly. I have also provided a script that will clean the
35environment so you can start from scratch. These are the steps to run the utility
36in this environment. The scripts are meant to be run from the root directory.
37
38 ./scripts/clean.sh
39 ./scripts/cp-data.sh
40 ./vpp_config.py
41
42When the utility is installed with pip the wrapper scripts/vpp-config is written to
43/usr/local/bin. However, the starting point when debugging this script locally is
44./vpp_config.py. Run the utility by executing ./vpp_config.py from the root directory.
45
46The start point in the code is in vpp_config.py. However, most of the work is done in
47the files in ./vpplib
48
49Uploading to PyPi:
50
51To upload this utility to PpPi simple do the following. Currently, I have my own account
52when we want everyone to contribute we will need to change that.
53
54 sudo ÐH bash
55 cd vpp_config
56 python setup.py sdist bdist_wheel
57 twine upload dist/*
58
59Example Run:
60
61# pip install vpp-config
62# vpp-config
63
64Welcome to the VPP system configuration utility
65
66These are the files we will modify:
67 /etc/vpp/startup.conf
68 /etc/sysctl.d/80-vpp.conf
69 /etc/default/grub
70
71Before we change them, we'll create working copies in /usr/local/vpp/vpp-config/dryrun
72Please inspect them carefully before applying the actual configuration (option 3)!
73
74What would you like to do?
75
761) Show basic system information
772) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
78 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
793) Full configuration (WARNING: This will change the system configuration)
804) Install/Uninstall VPP.
815) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
826) Install QEMU patch (Needed when running openstack).
839 or q) Quit
84
85Command: 1
86
87==============================
88NODE: DUT1
89
90CPU:
91 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
92 CPU(s): 32
93 Thread(s) per core: 2
94 Core(s) per socket: 8
95 Socket(s): 2
96 NUMA node0 CPU(s): 0-7,16-23
97 NUMA node1 CPU(s): 8-15,24-31
98 CPU max MHz: 3600.0000
99 CPU min MHz: 1200.0000
100 SMT: Enabled
101
102VPP Threads: (Name: Cpu Number)
103
104Grub Command Line:
105 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
106 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
107
108Huge Pages:
109 Total System Memory : 65863484 kB
110 Total Free Memory : 41325924 kB
111 Actual Huge Page Total : 8192
112 Configured Huge Page Total : 1024
113 Huge Pages Free : 8192
114 Huge Page Size : 2048 kB
115
116Devices:
117
118Status:
119 Not Installed
120
121==============================
122
123What would you like to do?
124
1251) Show basic system information
1262) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
127 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1283) Full configuration (WARNING: This will change the system configuration)
1294) Install/Uninstall VPP.
1305) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
1316) Install QEMU patch (Needed when running openstack).
1329 or q) Quit
133
134Command: 4
135
136There are no VPP packages on node localhost.
137Do you want to install VPP [Y/n]?
138INFO:root: Local Command: ls /etc/apt/sources.list.d/99fd.io.list.orig
139INFO:root: /etc/apt/sources.list.d/99fd.io.list.orig
140ÉÉ..
141
142What would you like to do?
143
1441) Show basic system information
1452) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
146 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1473) Full configuration (WARNING: This will change the system configuration)
1484) Install/Uninstall VPP.
1495) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
1506) Install QEMU patch (Needed when running openstack).
1519 or q) Quit
152
153Command: 1
154
155==============================
156NODE: DUT1
157
158CPU:
159 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
160 CPU(s): 32
161 Thread(s) per core: 2
162 Core(s) per socket: 8
163 Socket(s): 2
164 NUMA node0 CPU(s): 0-7,16-23
165 NUMA node1 CPU(s): 8-15,24-31
166 CPU max MHz: 3600.0000
167 CPU min MHz: 1200.0000
168 SMT: Enabled
169
170VPP Threads: (Name: Cpu Number)
171 vpp_main : 0
172 vpp_stats : 0
173
174Grub Command Line:
175 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
176 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
177
178Huge Pages:
179 Total System Memory : 65863484 kB
180 Total Free Memory : 55877364 kB
181 Actual Huge Page Total : 1024
182 Configured Huge Page Total : 1024
183 Huge Pages Free : 1024
184 Huge Page Size : 2048 kB
185
186Devices:
187Name Socket RXQs RXDescs TXQs TXDescs
188
189Status:
190 active (running)
191
192==============================
193
194What would you like to do?
195
1961) Show basic system information
1972) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
198 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1993) Full configuration (WARNING: This will change the system configuration)
2004) Install/Uninstall VPP.
2015) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
2026) Install QEMU patch (Needed when running openstack).
2039 or q) Quit
204
205Command: 2
206
207These device(s) are currently NOT being used by VPP or the OS.
208
209PCI ID Description
210----------------------------------------------------------------
2110000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2120000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
213
214Would you like to give any of these devices back to the OS [y/N]? y
215Would you like to use device 0000:02:00.0 for the OS [y/N]? y
216Would you like to use device 0000:02:00.1 for the OS [y/N]? y
217
218These devices have kernel interfaces, but appear to be safe to use with VPP.
219
220PCI ID Kernel Interface(s) Description
221------------------------------------------------------------------------------------------
2220000:90:00.0 enp144s0 VIC Ethernet NIC
2230000:8f:00.0 enp143s0 VIC Ethernet NIC
2240000:84:00.0 enp132s0f0,enp132s0f0d1 Ethernet Controller XL710 for 40GbE QSFP+
2250000:84:00.1 enp132s0f1,enp132s0f1d1 Ethernet Controller XL710 for 40GbE QSFP+
2260000:08:00.1 enp8s0f1 I350 Gigabit Network Connection
2270000:02:00.0 enp2s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2280000:02:00.1 enp2s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2290000:86:00.0 enp134s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2300000:86:00.1 enp134s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
231
232Would you like to use any of these device(s) for VPP [y/N]? y
233Would you like to use device 0000:90:00.0 for VPP [y/N]?
234Would you like to use device 0000:8f:00.0 for VPP [y/N]?
235Would you like to use device 0000:84:00.0 for VPP [y/N]?
236Would you like to use device 0000:84:00.1 for VPP [y/N]?
237Would you like to use device 0000:08:00.1 for VPP [y/N]?
238Would you like to use device 0000:02:00.0 for VPP [y/N]? y
239Would you like to use device 0000:02:00.1 for VPP [y/N]? y
240Would you like to use device 0000:86:00.0 for VPP [y/N]? y
241Would you like to use device 0000:86:00.1 for VPP [y/N]? y
242
243These device(s) will be used by VPP.
244
245PCI ID Description
246----------------------------------------------------------------
2470000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2480000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2490000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2500000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
251
252Would you like to remove any of these device(s) [y/N]?
253
254These device(s) will be used by VPP, please rerun this option if this is incorrect.
255
256PCI ID Description
257----------------------------------------------------------------
2580000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2590000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2600000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2610000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
262
263Your system has 32 core(s) and 2 Numa Nodes.
264To begin, we suggest not reserving any cores for VPP or other processes.
265Then to improve performance try reserving cores as needed.
266
267How many core(s) do you want to reserve for processes other than VPP? [0-16][0]? 4
268How many core(s) shall we reserve for VPP workers[0-4][0]? 2
269Should we reserve 1 core for the VPP Main thread? [Y/n]?
270
271There currently 1024 2048 kB huge pages free.
272Do you want to reconfigure the number of huge pages [y/N]? y
273
274There currently a total of 1024 huge pages.
275How many huge pages do you want [1024 - 22511][1024]? 8192
276
277What would you like to do?
278
2791) Show basic system information
2802) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
281 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
2823) Full configuration (WARNING: This will change the system configuration)
2834) Install/Uninstall VPP.
2845) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
2856) Install QEMU patch (Needed when running openstack).
2869 or q) Quit
287
288Command: 3
289
290We are now going to configure your system(s).
291
292Are you sure you want to do this [Y/n]?
293These are the changes we will apply to
294the huge page file (/etc/sysctl.d/80-vpp.conf).
295
2961,2d0
297< # Number of 2MB hugepages desired
298< vm.nr_hugepages=1024
2994,7c2,3
300< # Must be greater than or equal to (2 * vm.nr_hugepages).
301< vm.max_map_count=3096
302<
303< # All groups allowed to access hugepages
304---
305> vm.nr_hugepages=8192
306> vm.max_map_count=17408
3078a5
308> kernel.shmmax=17179869184
30910,15d6
310< # Shared Memory Max must be greator or equal to the total size of hugepages.
311< # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
312< # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
313< # is greater than the calculated TotalHugepageSize then set this parameter
314< # to current shmmax value.
315< kernel.shmmax=2147483648
316
317
318Are you sure you want to apply these changes [Y/n]?
319These are the changes we will apply to
320the VPP startup file (/etc/vpp/startup.conf).
321
3223c3
323< nodaemon
324---
325> interactive
3265a6
327> cli-listen /run/vpp/cli.sock
32817c18,25
329< ## In the VPP there is one main thread and optionally the user can create worker(s)
330---
331>
332> main-core 8
333> corelist-workers 9-10,5-6
334>
335> scheduler-policy fifo
336> scheduler-priority 50
337>
338> ## In the VPP there is one main thread and optionally the user can create worker(s)
33952,53c60,76
340< # dpdk {
341< ## Change default settings for all intefaces
342---
343> dpdk {
344>
345> dev 0000:86:00.0 {
346> num-rx-queues 2
347> }
348> dev 0000:86:00.1 {
349> num-rx-queues 2
350> }
351> dev 0000:02:00.0 {
352> num-rx-queues 2
353> }
354> dev 0000:02:00.1 {
355> num-rx-queues 2
356> }
357> num-mbufs 71680
358>
359> ## Change default settings for all intefaces
36082a106,115
361> ## Specify bonded interface and its slaves via PCI addresses
362> ##
363> ## Bonded interface in XOR load balance mode (mode 2) with L3 and L4 headers
364> # vdev eth_bond0,mode=2,slave=0000:02:00.0,slave=0000:03:00.0,xmit_policy=l34
365> # vdev eth_bond1,mode=2,slave=0000:02:00.1,slave=0000:03:00.1,xmit_policy=l34
366> ##
367> ## Bonded interface in Active-Back up mode (mode 1)
368> # vdev eth_bond0,mode=1,slave=0000:02:00.0,slave=0000:03:00.0
369> # vdev eth_bond1,mode=1,slave=0000:02:00.1,slave=0000:03:00.1
370>
37199c132
372< # }
373---
374> }
375108a142
376>
377
378
379Are you sure you want to apply these changes [Y/n]?
380
381The configured grub cmdline looks like this:
382GRUB_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"
383
384The current boot cmdline looks like this:
385BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
386
387Do you want to keep the current boot cmdline [Y/n]?
388
389What would you like to do?
390
3911) Show basic system information
3922) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
393 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
3943) Full configuration (WARNING: This will change the system configuration)
3954) Install/Uninstall VPP.
3965) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
3976) Install QEMU patch (Needed when running openstack).
3989 or q) Quit
399
400Command: 1
401
402==============================
403NODE: DUT1
404
405CPU:
406 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
407 CPU(s): 32
408 Thread(s) per core: 2
409 Core(s) per socket: 8
410 Socket(s): 2
411 NUMA node0 CPU(s): 0-7,16-23
412 NUMA node1 CPU(s): 8-15,24-31
413 CPU max MHz: 3600.0000
414 CPU min MHz: 1200.0000
415 SMT: Enabled
416
417VPP Threads: (Name: Cpu Number)
418
419Grub Command Line:
420 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
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"
422
423Huge Pages:
424 Total System Memory : 65863484 kB
425 Total Free Memory : 41163916 kB
426 Actual Huge Page Total : 8192
427 Configured Huge Page Total : 8192
428 Huge Pages Free : 3108
429 Huge Page Size : 2048 kB
430
431Devices:
432Total Number of Buffers: 71680
433
434Status:
435 active (running)
436 Sep 27 12:49:59 tf-ucs-3 vpp[13671]: EAL: No free hugepages reported in hugepages-1048576kB
437
438==============================
439
440What would you like to do?
441
4421) Show basic system information
4432) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
444 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
4453) Full configuration (WARNING: This will change the system configuration)
4464) Install/Uninstall VPP.
4475) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
4486) Install QEMU patch (Needed when running openstack).
4499 or q) Quit
450
451Command: 1
452
453==============================
454NODE: DUT1
455
456CPU:
457 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
458 CPU(s): 32
459 Thread(s) per core: 2
460 Core(s) per socket: 8
461 Socket(s): 2
462 NUMA node0 CPU(s): 0-7,16-23
463 NUMA node1 CPU(s): 8-15,24-31
464 CPU max MHz: 3600.0000
465 CPU min MHz: 1200.0000
466 SMT: Enabled
467
468VPP Threads: (Name: Cpu Number)
469 vpp_stats : 0
470 vpp_wk_2 : 9
471 vpp_wk_3 : 10
472 vpp_wk_0 : 5
473 vpp_wk_1 : 6
474 vpp_main : 8
475
476Grub Command Line:
477 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
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"
479
480Huge Pages:
481 Total System Memory : 65863484 kB
482 Total Free Memory : 41170684 kB
483 Actual Huge Page Total : 8192
484 Configured Huge Page Total : 8192
485 Huge Pages Free : 7936
486 Huge Page Size : 2048 kB
487
488Devices:
489Total Number of Buffers: 71680
490Name Socket RXQs RXDescs TXQs TXDescs
491TenGigabitEthernet2/0/0 0 2 1024 5 1024
492TenGigabitEthernet2/0/1 0 2 1024 5 1024
493TenGigabitEthernet86/0/0 1 2 1024 5 1024
494TenGigabitEthernet86/0/1 1 2 1024 5 1024
495
496Status:
497 active (running)
498
499==============================
500
501What would you like to do?
502
5031) Show basic system information
5042) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
505 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
5063) Full configuration (WARNING: This will change the system configuration)
5074) Install/Uninstall VPP.
5085) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
5096) Install QEMU patch (Needed when running openstack).
5109 or q) Quit
511
512Command: q
513#