@@ -422,30 +422,35 @@ UPF is used in both cases.
422
422
423
423
Enable SR-IOV and DPDK
424
424
~~~~~~~~~~~~~~~~~~~~~~~~~~
425
- UPF performance can be improved by enabling SR-IOV and DPDK.
426
425
427
- Pre-requisite:
428
- * make sure virtualization and VT-d parameters are enabled in BIOS.
426
+ UPF performance can be improved by enabling SR-IOV and DPDK. This
427
+ blueprint supports both optimizations, where the former depends on the
428
+ server NIC(s) being SR-IOV capable. Before getting to the blueprint
429
+ itself, we note the following hardware-related prerequisites.
429
430
430
- * make sure enough hugepage memory allocated, iommu enabled. These changes
431
- can be made by updating
432
- GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt default_hugepagesz=1G hugepagesz=1G hugepages=32 transparent_hugepage=never"
433
- in /etc/default/grub
431
+ * Make sure virtualization and VT-d parameters are enabled in the BIOS.
434
432
435
- Note: Number of hugepages = 2 X No of UPF Instances
433
+ * Make sure enough ``hugepage `` memory has been allocated and
434
+ ``iommu `` is enabled. These changes can be made by updating
435
+ ``/etc/default/grub ``:
436
436
437
- Once it is updated apply the changes by running below command,
437
+ .. code-block ::
438
+
439
+ GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt default_hugepagesz=1G hugepagesz=1G hugepages=32 transparent_hugepage=never"
440
+
441
+ Note that the number of ``hugepages `` must be two times the number
442
+ of UPF Instances. Once the file is updated, apply the changes by running:
438
443
439
444
.. code-block ::
440
445
441
- $sudo update-grub
442
- $sudo reboot
446
+ $ sudo update-grub
447
+ $ sudo reboot
443
448
444
- You can verify the allocated hugepages using below command,
449
+ Verify the allocated `` hugepages `` using the following command:
445
450
446
451
.. code-block ::
447
452
448
- $cat /proc/meminfo | grep HugePages
453
+ $ cat /proc/meminfo | grep HugePages
449
454
AnonHugePages: 0 kB
450
455
ShmemHugePages: 0 kB
451
456
FileHugePages: 0 kB
@@ -454,36 +459,36 @@ Pre-requisite:
454
459
HugePages_Rsvd: 0
455
460
HugePages_Surp: 0
456
461
457
- * Create required VF devices(minimum 2 required per UPF) as follows,
458
- (In this example the PF interface used is "ens801f0")
462
+ * Create the required VF devices, where a minimum of two is required
463
+ for each UPF. Using ``ens801f0 `` as an example VF interface, this is
464
+ done as follows:
459
465
460
466
.. code-block ::
461
467
462
- echo 2 > /sys/class/net/ens801f0/device/sriov_numvfs
468
+ $ echo 2 > /sys/class/net/ens801f0/device/sriov_numvfs
463
469
464
- Now retrieve the PCI address for the newly created VF devices using below command,
470
+ Retrieve the PCI address for the newly created VF devices using
471
+ the following command:
465
472
466
473
.. code-block ::
467
474
468
- ls -l /sys/class/net/ens801f0/device/virtfn*
475
+ $ ls -l /sys/class/net/ens801f0/device/virtfn*
469
476
470
- * Clone the DPDK repo to use the binding tools,
477
+ * Clone the DPDK repo to use the binding tools:
471
478
472
479
.. code-block ::
473
480
474
- git clone https://github.com/DPDK/dpdk.git
475
- cd dpdk
481
+ $ git clone https://github.com/DPDK/dpdk.git
482
+ $ cd dpdk
476
483
477
- * Bind the VF devices to the vfio-pci driver as follows,
484
+ * Bind the VF devices to the `` vfio-pci `` driver as follows:
478
485
479
486
.. code-block ::
480
487
481
- ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.0
482
- ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.1
488
+ $ ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.0
489
+ $ ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.1
483
490
484
- This blueprint supports both optimizations, where the former depends on the
485
- server NIC(s) being SR-IOV capable. The blueprint includes the
486
- following:
491
+ Returning to the OnRamp blueprint, it includes the following:
487
492
488
493
* Global vars file ``vars/main-sriov.yml `` gives the overall blueprint
489
494
specification.
0 commit comments