blob: 8995edfce9f29868ba7c3ea8a97b469cbabdda4c [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.
Paul Vinciguerra339bc6b2018-12-19 02:05:25 -080014Then simply type vpp-config and answer the questions. If you are not sure what
John DeNisco68b0ee32017-09-27 16:35:23 -040015to 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
Paul Vinciguerra339bc6b2018-12-19 02:05:25 -080039 ./scripts/cp-data.sh
40 ./vpp-config
John DeNisco68b0ee32017-09-27 16:35:23 -040041
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
Paul Vinciguerra339bc6b2018-12-19 02:05:25 -080044vpp-config. Run the utility by executing vpp-config.
John DeNisco68b0ee32017-09-27 16:35:23 -040045
Paul Vinciguerra339bc6b2018-12-19 02:05:25 -080046The start point in the code is in vpp_config.py. However, most of the work is
47done in
John DeNisco68b0ee32017-09-27 16:35:23 -040048the files in ./vpplib
49
50Uploading to PyPi:
51
52To upload this utility to PpPi simple do the following. Currently, I have my own account
53when we want everyone to contribute we will need to change that.
54
Paul Vinciguerra339bc6b2018-12-19 02:05:25 -080055 sudo H bash
John DeNisco68b0ee32017-09-27 16:35:23 -040056 cd vpp_config
57 python setup.py sdist bdist_wheel
58 twine upload dist/*
59
60Example Run:
61
62# pip install vpp-config
63# vpp-config
64
65Welcome to the VPP system configuration utility
66
67These are the files we will modify:
68 /etc/vpp/startup.conf
69 /etc/sysctl.d/80-vpp.conf
70 /etc/default/grub
71
72Before we change them, we'll create working copies in /usr/local/vpp/vpp-config/dryrun
73Please inspect them carefully before applying the actual configuration (option 3)!
74
75What would you like to do?
76
771) Show basic system information
782) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
79 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
803) Full configuration (WARNING: This will change the system configuration)
814) Install/Uninstall VPP.
825) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
836) Install QEMU patch (Needed when running openstack).
849 or q) Quit
85
86Command: 1
87
88==============================
89NODE: DUT1
90
91CPU:
92 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
93 CPU(s): 32
94 Thread(s) per core: 2
95 Core(s) per socket: 8
96 Socket(s): 2
97 NUMA node0 CPU(s): 0-7,16-23
98 NUMA node1 CPU(s): 8-15,24-31
99 CPU max MHz: 3600.0000
100 CPU min MHz: 1200.0000
101 SMT: Enabled
102
103VPP Threads: (Name: Cpu Number)
104
105Grub Command Line:
106 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
107 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
108
109Huge Pages:
110 Total System Memory : 65863484 kB
111 Total Free Memory : 41325924 kB
112 Actual Huge Page Total : 8192
113 Configured Huge Page Total : 1024
114 Huge Pages Free : 8192
115 Huge Page Size : 2048 kB
116
117Devices:
118
119Status:
120 Not Installed
121
122==============================
123
124What would you like to do?
125
1261) Show basic system information
1272) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
128 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1293) Full configuration (WARNING: This will change the system configuration)
1304) Install/Uninstall VPP.
1315) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
1326) Install QEMU patch (Needed when running openstack).
1339 or q) Quit
134
135Command: 4
136
137There are no VPP packages on node localhost.
138Do you want to install VPP [Y/n]?
139INFO:root: Local Command: ls /etc/apt/sources.list.d/99fd.io.list.orig
140INFO:root: /etc/apt/sources.list.d/99fd.io.list.orig
Paul Vinciguerra339bc6b2018-12-19 02:05:25 -0800141��..
John DeNisco68b0ee32017-09-27 16:35:23 -0400142
143What would you like to do?
144
1451) Show basic system information
1462) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
147 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1483) Full configuration (WARNING: This will change the system configuration)
1494) Install/Uninstall VPP.
1505) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
1516) Install QEMU patch (Needed when running openstack).
1529 or q) Quit
153
154Command: 1
155
156==============================
157NODE: DUT1
158
159CPU:
160 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
161 CPU(s): 32
162 Thread(s) per core: 2
163 Core(s) per socket: 8
164 Socket(s): 2
165 NUMA node0 CPU(s): 0-7,16-23
166 NUMA node1 CPU(s): 8-15,24-31
167 CPU max MHz: 3600.0000
168 CPU min MHz: 1200.0000
169 SMT: Enabled
170
171VPP Threads: (Name: Cpu Number)
172 vpp_main : 0
173 vpp_stats : 0
174
175Grub Command Line:
176 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
177 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
178
179Huge Pages:
180 Total System Memory : 65863484 kB
181 Total Free Memory : 55877364 kB
182 Actual Huge Page Total : 1024
183 Configured Huge Page Total : 1024
184 Huge Pages Free : 1024
185 Huge Page Size : 2048 kB
186
187Devices:
188Name Socket RXQs RXDescs TXQs TXDescs
189
190Status:
191 active (running)
192
193==============================
194
195What would you like to do?
196
1971) Show basic system information
1982) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
199 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
2003) Full configuration (WARNING: This will change the system configuration)
2014) Install/Uninstall VPP.
2025) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
2036) Install QEMU patch (Needed when running openstack).
2049 or q) Quit
205
206Command: 2
207
208These device(s) are currently NOT being used by VPP or the OS.
209
210PCI ID Description
211----------------------------------------------------------------
2120000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2130000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
214
215Would you like to give any of these devices back to the OS [y/N]? y
216Would you like to use device 0000:02:00.0 for the OS [y/N]? y
217Would you like to use device 0000:02:00.1 for the OS [y/N]? y
218
219These devices have kernel interfaces, but appear to be safe to use with VPP.
220
221PCI ID Kernel Interface(s) Description
222------------------------------------------------------------------------------------------
2230000:90:00.0 enp144s0 VIC Ethernet NIC
2240000:8f:00.0 enp143s0 VIC Ethernet NIC
2250000:84:00.0 enp132s0f0,enp132s0f0d1 Ethernet Controller XL710 for 40GbE QSFP+
2260000:84:00.1 enp132s0f1,enp132s0f1d1 Ethernet Controller XL710 for 40GbE QSFP+
2270000:08:00.1 enp8s0f1 I350 Gigabit Network Connection
2280000:02:00.0 enp2s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2290000:02:00.1 enp2s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2300000:86:00.0 enp134s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2310000:86:00.1 enp134s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
232
233Would you like to use any of these device(s) for VPP [y/N]? y
234Would you like to use device 0000:90:00.0 for VPP [y/N]?
235Would you like to use device 0000:8f:00.0 for VPP [y/N]?
236Would you like to use device 0000:84:00.0 for VPP [y/N]?
237Would you like to use device 0000:84:00.1 for VPP [y/N]?
238Would you like to use device 0000:08:00.1 for VPP [y/N]?
239Would you like to use device 0000:02:00.0 for VPP [y/N]? y
240Would you like to use device 0000:02:00.1 for VPP [y/N]? y
241Would you like to use device 0000:86:00.0 for VPP [y/N]? y
242Would you like to use device 0000:86:00.1 for VPP [y/N]? y
243
244These device(s) will be used by VPP.
245
246PCI ID Description
247----------------------------------------------------------------
2480000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2490000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2500000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2510000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
252
253Would you like to remove any of these device(s) [y/N]?
254
255These device(s) will be used by VPP, please rerun this option if this is incorrect.
256
257PCI ID Description
258----------------------------------------------------------------
2590000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2600000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2610000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2620000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
263
264Your system has 32 core(s) and 2 Numa Nodes.
265To begin, we suggest not reserving any cores for VPP or other processes.
266Then to improve performance try reserving cores as needed.
267
268How many core(s) do you want to reserve for processes other than VPP? [0-16][0]? 4
269How many core(s) shall we reserve for VPP workers[0-4][0]? 2
270Should we reserve 1 core for the VPP Main thread? [Y/n]?
271
272There currently 1024 2048 kB huge pages free.
273Do you want to reconfigure the number of huge pages [y/N]? y
274
275There currently a total of 1024 huge pages.
276How many huge pages do you want [1024 - 22511][1024]? 8192
277
278What would you like to do?
279
2801) Show basic system information
2812) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
282 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
2833) Full configuration (WARNING: This will change the system configuration)
2844) Install/Uninstall VPP.
2855) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
2866) Install QEMU patch (Needed when running openstack).
2879 or q) Quit
288
289Command: 3
290
291We are now going to configure your system(s).
292
293Are you sure you want to do this [Y/n]?
294These are the changes we will apply to
295the huge page file (/etc/sysctl.d/80-vpp.conf).
296
2971,2d0
298< # Number of 2MB hugepages desired
299< vm.nr_hugepages=1024
3004,7c2,3
301< # Must be greater than or equal to (2 * vm.nr_hugepages).
302< vm.max_map_count=3096
303<
304< # All groups allowed to access hugepages
305---
306> vm.nr_hugepages=8192
307> vm.max_map_count=17408
3088a5
309> kernel.shmmax=17179869184
31010,15d6
311< # Shared Memory Max must be greator or equal to the total size of hugepages.
312< # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
313< # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
314< # is greater than the calculated TotalHugepageSize then set this parameter
315< # to current shmmax value.
316< kernel.shmmax=2147483648
317
318
319Are you sure you want to apply these changes [Y/n]?
320These are the changes we will apply to
321the VPP startup file (/etc/vpp/startup.conf).
322
3233c3
324< nodaemon
325---
326> interactive
3275a6
328> cli-listen /run/vpp/cli.sock
32917c18,25
330< ## In the VPP there is one main thread and optionally the user can create worker(s)
331---
332>
333> main-core 8
334> corelist-workers 9-10,5-6
335>
336> scheduler-policy fifo
337> scheduler-priority 50
338>
339> ## In the VPP there is one main thread and optionally the user can create worker(s)
34052,53c60,76
341< # dpdk {
342< ## Change default settings for all intefaces
343---
344> dpdk {
345>
346> dev 0000:86:00.0 {
347> num-rx-queues 2
348> }
349> dev 0000:86:00.1 {
350> num-rx-queues 2
351> }
352> dev 0000:02:00.0 {
353> num-rx-queues 2
354> }
355> dev 0000:02:00.1 {
356> num-rx-queues 2
357> }
358> num-mbufs 71680
359>
360> ## Change default settings for all intefaces
36182a106,115
362> ## Specify bonded interface and its slaves via PCI addresses
363> ##
364> ## Bonded interface in XOR load balance mode (mode 2) with L3 and L4 headers
365> # vdev eth_bond0,mode=2,slave=0000:02:00.0,slave=0000:03:00.0,xmit_policy=l34
366> # vdev eth_bond1,mode=2,slave=0000:02:00.1,slave=0000:03:00.1,xmit_policy=l34
367> ##
368> ## Bonded interface in Active-Back up mode (mode 1)
369> # vdev eth_bond0,mode=1,slave=0000:02:00.0,slave=0000:03:00.0
370> # vdev eth_bond1,mode=1,slave=0000:02:00.1,slave=0000:03:00.1
371>
37299c132
373< # }
374---
375> }
376108a142
377>
378
379
380Are you sure you want to apply these changes [Y/n]?
381
382The configured grub cmdline looks like this:
383GRUB_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"
384
385The current boot cmdline looks like this:
386BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
387
388Do you want to keep the current boot cmdline [Y/n]?
389
390What would you like to do?
391
3921) Show basic system information
3932) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
394 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
3953) Full configuration (WARNING: This will change the system configuration)
3964) Install/Uninstall VPP.
3975) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
3986) Install QEMU patch (Needed when running openstack).
3999 or q) Quit
400
401Command: 1
402
403==============================
404NODE: DUT1
405
406CPU:
407 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
408 CPU(s): 32
409 Thread(s) per core: 2
410 Core(s) per socket: 8
411 Socket(s): 2
412 NUMA node0 CPU(s): 0-7,16-23
413 NUMA node1 CPU(s): 8-15,24-31
414 CPU max MHz: 3600.0000
415 CPU min MHz: 1200.0000
416 SMT: Enabled
417
418VPP Threads: (Name: Cpu Number)
419
420Grub Command Line:
421 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
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"
423
424Huge Pages:
425 Total System Memory : 65863484 kB
426 Total Free Memory : 41163916 kB
427 Actual Huge Page Total : 8192
428 Configured Huge Page Total : 8192
429 Huge Pages Free : 3108
430 Huge Page Size : 2048 kB
431
432Devices:
433Total Number of Buffers: 71680
434
435Status:
436 active (running)
437 Sep 27 12:49:59 tf-ucs-3 vpp[13671]: EAL: No free hugepages reported in hugepages-1048576kB
438
439==============================
440
441What would you like to do?
442
4431) Show basic system information
4442) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
445 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
4463) Full configuration (WARNING: This will change the system configuration)
4474) Install/Uninstall VPP.
4485) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
4496) Install QEMU patch (Needed when running openstack).
4509 or q) Quit
451
452Command: 1
453
454==============================
455NODE: DUT1
456
457CPU:
458 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
459 CPU(s): 32
460 Thread(s) per core: 2
461 Core(s) per socket: 8
462 Socket(s): 2
463 NUMA node0 CPU(s): 0-7,16-23
464 NUMA node1 CPU(s): 8-15,24-31
465 CPU max MHz: 3600.0000
466 CPU min MHz: 1200.0000
467 SMT: Enabled
468
469VPP Threads: (Name: Cpu Number)
470 vpp_stats : 0
471 vpp_wk_2 : 9
472 vpp_wk_3 : 10
473 vpp_wk_0 : 5
474 vpp_wk_1 : 6
475 vpp_main : 8
476
477Grub Command Line:
478 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
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"
480
481Huge Pages:
482 Total System Memory : 65863484 kB
483 Total Free Memory : 41170684 kB
484 Actual Huge Page Total : 8192
485 Configured Huge Page Total : 8192
486 Huge Pages Free : 7936
487 Huge Page Size : 2048 kB
488
489Devices:
490Total Number of Buffers: 71680
491Name Socket RXQs RXDescs TXQs TXDescs
492TenGigabitEthernet2/0/0 0 2 1024 5 1024
493TenGigabitEthernet2/0/1 0 2 1024 5 1024
494TenGigabitEthernet86/0/0 1 2 1024 5 1024
495TenGigabitEthernet86/0/1 1 2 1024 5 1024
496
497Status:
498 active (running)
499
500==============================
501
502What would you like to do?
503
5041) Show basic system information
5052) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
506 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
5073) Full configuration (WARNING: This will change the system configuration)
5084) Install/Uninstall VPP.
5095) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
5106) Install QEMU patch (Needed when running openstack).
5119 or q) Quit
512
513Command: q
514#