@@ -422,9 +422,66 @@ UPF is used in both cases.
422422
423423Enable SR-IOV and DPDK
424424~~~~~~~~~~~~~~~~~~~~~~~~~~
425+ UPF performance can be improved by enabling SR-IOV and DPDK.
425426
426- UPF performance can be improved by enabling SR-IOV and DPDK. This
427- blueprint supports both optimizations, where the former depends on the
427+ Pre-requisite:
428+ * make sure virtualization and VT-d parameters are enabled in BIOS.
429+
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
434+
435+ Note: Number of hugepages = 2 X No of UPF Instances
436+
437+ Once it is updated apply the changes by running below command,
438+
439+ .. code-block ::
440+
441+ $sudo update-grub
442+ $sudo reboot
443+
444+ You can verify the allocated hugepages using below command,
445+
446+ .. code-block ::
447+
448+ $cat /proc/meminfo | grep HugePages
449+ AnonHugePages: 0 kB
450+ ShmemHugePages: 0 kB
451+ FileHugePages: 0 kB
452+ HugePages_Total: 32
453+ HugePages_Free: 32
454+ HugePages_Rsvd: 0
455+ HugePages_Surp: 0
456+
457+ * Create required VF devices(minimum 2 required per UPF) as follows,
458+ (In this example the PF interface used is "ens801f0")
459+
460+ .. code-block ::
461+
462+ echo 2 > /sys/class/net/ens801f0/device/sriov_numvfs
463+
464+ Now retrieve the PCI address for the newly created VF devices using below command,
465+
466+ .. code-block ::
467+
468+ ls -l /sys/class/net/ens801f0/device/virtfn*
469+
470+ * Clone the DPDK repo to use the binding tools,
471+
472+ .. code-block ::
473+
474+ git clone https://github.com/DPDK/dpdk.git
475+ cd dpdk
476+
477+ * Bind the VF devices to the vfio-pci driver as follows,
478+
479+ .. code-block ::
480+
481+ ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.0
482+ ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.1
483+
484+ This blueprint supports both optimizations, where the former depends on the
428485server NIC(s) being SR-IOV capable. The blueprint includes the
429486following:
430487
0 commit comments