blob: 748f66f7c0edec688e31d881747542568bd5f81b [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
8released with release 17.07.
9
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
26- Only supports Ubuntu, centos7 is coming shortly.
27- When Inspecting the system, you may see a Huge page error, inspect the system a
28few more times, if the error persists it is real.
29
30For Developers:
31
32Modifying the code is reasonable simple. The process would be edit and debug the
33code from the root directory. In order to do this, we need a script that will copy
34or data files to the proper place. This is where they end up with pip install. For
35Ubuntu, this is /usr/local/vpp/vpp-config. I have provided a script that will copy
36the relevant files correctly. I have also provided a script that will clean the
37environment so you can start from scratch. These are the steps to run the utility
38in this environment. The scripts are meant to be run from the root directory.
39
40 ./scripts/clean.sh
41 ./scripts/cp-data.sh
42 ./vpp_config.py
43
44When the utility is installed with pip the wrapper scripts/vpp-config is written to
45/usr/local/bin. However, the starting point when debugging this script locally is
46./vpp_config.py. Run the utility by executing ./vpp_config.py from the root directory.
47
48The start point in the code is in vpp_config.py. However, most of the work is done in
49the files in ./vpplib
50
51Uploading to PyPi:
52
53To upload this utility to PpPi simple do the following. Currently, I have my own account
54when we want everyone to contribute we will need to change that.
55
56 sudo ÐH bash
57 cd vpp_config
58 python setup.py sdist bdist_wheel
59 twine upload dist/*
60
61Example Run:
62
63# pip install vpp-config
64# vpp-config
65
66Welcome to the VPP system configuration utility
67
68These are the files we will modify:
69 /etc/vpp/startup.conf
70 /etc/sysctl.d/80-vpp.conf
71 /etc/default/grub
72
73Before we change them, we'll create working copies in /usr/local/vpp/vpp-config/dryrun
74Please inspect them carefully before applying the actual configuration (option 3)!
75
76What would you like to do?
77
781) Show basic system information
792) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
80 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
813) Full configuration (WARNING: This will change the system configuration)
824) Install/Uninstall VPP.
835) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
846) Install QEMU patch (Needed when running openstack).
859 or q) Quit
86
87Command: 1
88
89==============================
90NODE: DUT1
91
92CPU:
93 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
94 CPU(s): 32
95 Thread(s) per core: 2
96 Core(s) per socket: 8
97 Socket(s): 2
98 NUMA node0 CPU(s): 0-7,16-23
99 NUMA node1 CPU(s): 8-15,24-31
100 CPU max MHz: 3600.0000
101 CPU min MHz: 1200.0000
102 SMT: Enabled
103
104VPP Threads: (Name: Cpu Number)
105
106Grub Command Line:
107 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
108 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
109
110Huge Pages:
111 Total System Memory : 65863484 kB
112 Total Free Memory : 41325924 kB
113 Actual Huge Page Total : 8192
114 Configured Huge Page Total : 1024
115 Huge Pages Free : 8192
116 Huge Page Size : 2048 kB
117
118Devices:
119
120Status:
121 Not Installed
122
123==============================
124
125What would you like to do?
126
1271) Show basic system information
1282) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
129 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1303) Full configuration (WARNING: This will change the system configuration)
1314) Install/Uninstall VPP.
1325) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
1336) Install QEMU patch (Needed when running openstack).
1349 or q) Quit
135
136Command: 4
137
138There are no VPP packages on node localhost.
139Do you want to install VPP [Y/n]?
140INFO:root: Local Command: ls /etc/apt/sources.list.d/99fd.io.list.orig
141INFO:root: /etc/apt/sources.list.d/99fd.io.list.orig
142ÉÉ..
143
144What would you like to do?
145
1461) Show basic system information
1472) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
148 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
1493) Full configuration (WARNING: This will change the system configuration)
1504) Install/Uninstall VPP.
1515) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
1526) Install QEMU patch (Needed when running openstack).
1539 or q) Quit
154
155Command: 1
156
157==============================
158NODE: DUT1
159
160CPU:
161 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
162 CPU(s): 32
163 Thread(s) per core: 2
164 Core(s) per socket: 8
165 Socket(s): 2
166 NUMA node0 CPU(s): 0-7,16-23
167 NUMA node1 CPU(s): 8-15,24-31
168 CPU max MHz: 3600.0000
169 CPU min MHz: 1200.0000
170 SMT: Enabled
171
172VPP Threads: (Name: Cpu Number)
173 vpp_main : 0
174 vpp_stats : 0
175
176Grub Command Line:
177 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
178 Configured: GRUB_CMDLINE_LINUX_DEFAULT=""
179
180Huge Pages:
181 Total System Memory : 65863484 kB
182 Total Free Memory : 55877364 kB
183 Actual Huge Page Total : 1024
184 Configured Huge Page Total : 1024
185 Huge Pages Free : 1024
186 Huge Page Size : 2048 kB
187
188Devices:
189Name Socket RXQs RXDescs TXQs TXDescs
190
191Status:
192 active (running)
193
194==============================
195
196What would you like to do?
197
1981) Show basic system information
1992) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
200 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
2013) Full configuration (WARNING: This will change the system configuration)
2024) Install/Uninstall VPP.
2035) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
2046) Install QEMU patch (Needed when running openstack).
2059 or q) Quit
206
207Command: 2
208
209These device(s) are currently NOT being used by VPP or the OS.
210
211PCI ID Description
212----------------------------------------------------------------
2130000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2140000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
215
216Would you like to give any of these devices back to the OS [y/N]? y
217Would you like to use device 0000:02:00.0 for the OS [y/N]? y
218Would you like to use device 0000:02:00.1 for the OS [y/N]? y
219
220These devices have kernel interfaces, but appear to be safe to use with VPP.
221
222PCI ID Kernel Interface(s) Description
223------------------------------------------------------------------------------------------
2240000:90:00.0 enp144s0 VIC Ethernet NIC
2250000:8f:00.0 enp143s0 VIC Ethernet NIC
2260000:84:00.0 enp132s0f0,enp132s0f0d1 Ethernet Controller XL710 for 40GbE QSFP+
2270000:84:00.1 enp132s0f1,enp132s0f1d1 Ethernet Controller XL710 for 40GbE QSFP+
2280000:08:00.1 enp8s0f1 I350 Gigabit Network Connection
2290000:02:00.0 enp2s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2300000:02:00.1 enp2s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2310000:86:00.0 enp134s0f0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2320000:86:00.1 enp134s0f1 82599ES 10-Gigabit SFI/SFP+ Network Connection
233
234Would you like to use any of these device(s) for VPP [y/N]? y
235Would you like to use device 0000:90:00.0 for VPP [y/N]?
236Would you like to use device 0000:8f:00.0 for VPP [y/N]?
237Would you like to use device 0000:84:00.0 for VPP [y/N]?
238Would you like to use device 0000:84:00.1 for VPP [y/N]?
239Would you like to use device 0000:08:00.1 for VPP [y/N]?
240Would you like to use device 0000:02:00.0 for VPP [y/N]? y
241Would you like to use device 0000:02:00.1 for VPP [y/N]? y
242Would you like to use device 0000:86:00.0 for VPP [y/N]? y
243Would you like to use device 0000:86:00.1 for VPP [y/N]? y
244
245These device(s) will be used by VPP.
246
247PCI ID Description
248----------------------------------------------------------------
2490000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2500000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2510000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2520000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
253
254Would you like to remove any of these device(s) [y/N]?
255
256These device(s) will be used by VPP, please rerun this option if this is incorrect.
257
258PCI ID Description
259----------------------------------------------------------------
2600000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2610000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
2620000:02:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection
2630000:02:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection
264
265Your system has 32 core(s) and 2 Numa Nodes.
266To begin, we suggest not reserving any cores for VPP or other processes.
267Then to improve performance try reserving cores as needed.
268
269How many core(s) do you want to reserve for processes other than VPP? [0-16][0]? 4
270How many core(s) shall we reserve for VPP workers[0-4][0]? 2
271Should we reserve 1 core for the VPP Main thread? [Y/n]?
272
273There currently 1024 2048 kB huge pages free.
274Do you want to reconfigure the number of huge pages [y/N]? y
275
276There currently a total of 1024 huge pages.
277How many huge pages do you want [1024 - 22511][1024]? 8192
278
279What would you like to do?
280
2811) Show basic system information
2822) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
283 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
2843) Full configuration (WARNING: This will change the system configuration)
2854) Install/Uninstall VPP.
2865) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
2876) Install QEMU patch (Needed when running openstack).
2889 or q) Quit
289
290Command: 3
291
292We are now going to configure your system(s).
293
294Are you sure you want to do this [Y/n]?
295These are the changes we will apply to
296the huge page file (/etc/sysctl.d/80-vpp.conf).
297
2981,2d0
299< # Number of 2MB hugepages desired
300< vm.nr_hugepages=1024
3014,7c2,3
302< # Must be greater than or equal to (2 * vm.nr_hugepages).
303< vm.max_map_count=3096
304<
305< # All groups allowed to access hugepages
306---
307> vm.nr_hugepages=8192
308> vm.max_map_count=17408
3098a5
310> kernel.shmmax=17179869184
31110,15d6
312< # Shared Memory Max must be greator or equal to the total size of hugepages.
313< # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
314< # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
315< # is greater than the calculated TotalHugepageSize then set this parameter
316< # to current shmmax value.
317< kernel.shmmax=2147483648
318
319
320Are you sure you want to apply these changes [Y/n]?
321These are the changes we will apply to
322the VPP startup file (/etc/vpp/startup.conf).
323
3243c3
325< nodaemon
326---
327> interactive
3285a6
329> cli-listen /run/vpp/cli.sock
33017c18,25
331< ## In the VPP there is one main thread and optionally the user can create worker(s)
332---
333>
334> main-core 8
335> corelist-workers 9-10,5-6
336>
337> scheduler-policy fifo
338> scheduler-priority 50
339>
340> ## In the VPP there is one main thread and optionally the user can create worker(s)
34152,53c60,76
342< # dpdk {
343< ## Change default settings for all intefaces
344---
345> dpdk {
346>
347> dev 0000:86:00.0 {
348> num-rx-queues 2
349> }
350> dev 0000:86:00.1 {
351> num-rx-queues 2
352> }
353> dev 0000:02:00.0 {
354> num-rx-queues 2
355> }
356> dev 0000:02:00.1 {
357> num-rx-queues 2
358> }
359> num-mbufs 71680
360>
361> ## Change default settings for all intefaces
36282a106,115
363> ## Specify bonded interface and its slaves via PCI addresses
364> ##
365> ## Bonded interface in XOR load balance mode (mode 2) with L3 and L4 headers
366> # vdev eth_bond0,mode=2,slave=0000:02:00.0,slave=0000:03:00.0,xmit_policy=l34
367> # vdev eth_bond1,mode=2,slave=0000:02:00.1,slave=0000:03:00.1,xmit_policy=l34
368> ##
369> ## Bonded interface in Active-Back up mode (mode 1)
370> # vdev eth_bond0,mode=1,slave=0000:02:00.0,slave=0000:03:00.0
371> # vdev eth_bond1,mode=1,slave=0000:02:00.1,slave=0000:03:00.1
372>
37399c132
374< # }
375---
376> }
377108a142
378>
379
380
381Are you sure you want to apply these changes [Y/n]?
382
383The configured grub cmdline looks like this:
384GRUB_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"
385
386The current boot cmdline looks like this:
387BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
388
389Do you want to keep the current boot cmdline [Y/n]?
390
391What would you like to do?
392
3931) Show basic system information
3942) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
395 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
3963) Full configuration (WARNING: This will change the system configuration)
3974) Install/Uninstall VPP.
3985) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
3996) Install QEMU patch (Needed when running openstack).
4009 or q) Quit
401
402Command: 1
403
404==============================
405NODE: DUT1
406
407CPU:
408 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
409 CPU(s): 32
410 Thread(s) per core: 2
411 Core(s) per socket: 8
412 Socket(s): 2
413 NUMA node0 CPU(s): 0-7,16-23
414 NUMA node1 CPU(s): 8-15,24-31
415 CPU max MHz: 3600.0000
416 CPU min MHz: 1200.0000
417 SMT: Enabled
418
419VPP Threads: (Name: Cpu Number)
420
421Grub Command Line:
422 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
423 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"
424
425Huge Pages:
426 Total System Memory : 65863484 kB
427 Total Free Memory : 41163916 kB
428 Actual Huge Page Total : 8192
429 Configured Huge Page Total : 8192
430 Huge Pages Free : 3108
431 Huge Page Size : 2048 kB
432
433Devices:
434Total Number of Buffers: 71680
435
436Status:
437 active (running)
438 Sep 27 12:49:59 tf-ucs-3 vpp[13671]: EAL: No free hugepages reported in hugepages-1048576kB
439
440==============================
441
442What would you like to do?
443
4441) Show basic system information
4452) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
446 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
4473) Full configuration (WARNING: This will change the system configuration)
4484) Install/Uninstall VPP.
4495) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
4506) Install QEMU patch (Needed when running openstack).
4519 or q) Quit
452
453Command: 1
454
455==============================
456NODE: DUT1
457
458CPU:
459 Model name: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
460 CPU(s): 32
461 Thread(s) per core: 2
462 Core(s) per socket: 8
463 Socket(s): 2
464 NUMA node0 CPU(s): 0-7,16-23
465 NUMA node1 CPU(s): 8-15,24-31
466 CPU max MHz: 3600.0000
467 CPU min MHz: 1200.0000
468 SMT: Enabled
469
470VPP Threads: (Name: Cpu Number)
471 vpp_stats : 0
472 vpp_wk_2 : 9
473 vpp_wk_3 : 10
474 vpp_wk_0 : 5
475 vpp_wk_1 : 6
476 vpp_main : 8
477
478Grub Command Line:
479 Current: BOOT_IMAGE=/boot/vmlinuz-4.4.0-96-generic root=UUID=d760b82f-f37b-47e2-9815-db8d479a3557 ro
480 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"
481
482Huge Pages:
483 Total System Memory : 65863484 kB
484 Total Free Memory : 41170684 kB
485 Actual Huge Page Total : 8192
486 Configured Huge Page Total : 8192
487 Huge Pages Free : 7936
488 Huge Page Size : 2048 kB
489
490Devices:
491Total Number of Buffers: 71680
492Name Socket RXQs RXDescs TXQs TXDescs
493TenGigabitEthernet2/0/0 0 2 1024 5 1024
494TenGigabitEthernet2/0/1 0 2 1024 5 1024
495TenGigabitEthernet86/0/0 1 2 1024 5 1024
496TenGigabitEthernet86/0/1 1 2 1024 5 1024
497
498Status:
499 active (running)
500
501==============================
502
503What would you like to do?
504
5051) Show basic system information
5062) Dry Run (Will save the configuration files in /usr/local/vpp/vpp-config/dryrun for inspection)
507 and user input in /usr/local/vpp/vpp-config/configs/auto-config.yaml
5083) Full configuration (WARNING: This will change the system configuration)
5094) Install/Uninstall VPP.
5105) Dry Run from /usr/local/vpp/vpp-config/auto-config.yaml (will not ask questions).
5116) Install QEMU patch (Needed when running openstack).
5129 or q) Quit
513
514Command: q
515#