Skip to content

Commit

Permalink
Merge pull request #40 from sureshmarikkannu/dpdk_bp_prereq
Browse files Browse the repository at this point in the history
Update pre-requisite for SRIOV/DPDK blueprint
  • Loading branch information
llpeterson authored Jan 9, 2025
2 parents 31cefb7 + 20773e4 commit 8d08703
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 2 deletions.
6 changes: 6 additions & 0 deletions dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ hostname
hss
hssdb
https
hugepage
hugepages
hugepagesz
iOS
iPXE
iPhones
Expand All @@ -174,6 +177,7 @@ imei
incrementing
inotify
instantiation
iommu
ip
isn't
iteratively
Expand Down Expand Up @@ -234,6 +238,7 @@ patchsets
pcap
pcaps
pcf
pci
pcrf
pcrfdb
pfcp
Expand Down Expand Up @@ -317,6 +322,7 @@ upf
uplink
uptime
url
vfio
virtualenv
vpn
webhooks
Expand Down
61 changes: 59 additions & 2 deletions onramp/blueprints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,66 @@ UPF is used in both cases.

Enable SR-IOV and DPDK
~~~~~~~~~~~~~~~~~~~~~~~~~~
UPF performance can be improved by enabling SR-IOV and DPDK.

UPF performance can be improved by enabling SR-IOV and DPDK. This
blueprint supports both optimizations, where the former depends on the
Pre-requisite:
* make sure virtualization and VT-d parameters are enabled in BIOS.

* make sure enough hugepage memory allocated, iommu enabled. These changes
can be made by updating
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt default_hugepagesz=1G hugepagesz=1G hugepages=32 transparent_hugepage=never"
in /etc/default/grub

Note: Number of hugepages = 2 X No of UPF Instances

Once it is updated apply the changes by running below command,

.. code-block::
$sudo update-grub
$sudo reboot
You can verify the allocated hugepages using below command,

.. code-block::
$cat /proc/meminfo | grep HugePages
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
FileHugePages: 0 kB
HugePages_Total: 32
HugePages_Free: 32
HugePages_Rsvd: 0
HugePages_Surp: 0
* Create required VF devices(minimum 2 required per UPF) as follows,
(In this example the PF interface used is "ens801f0")

.. code-block::
echo 2 > /sys/class/net/ens801f0/device/sriov_numvfs
Now retrieve the PCI address for the newly created VF devices using below command,

.. code-block::
ls -l /sys/class/net/ens801f0/device/virtfn*
* Clone the DPDK repo to use the binding tools,

.. code-block::
git clone https://github.com/DPDK/dpdk.git
cd dpdk
* Bind the VF devices to the vfio-pci driver as follows,

.. code-block::
./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.0
./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:01.1
This blueprint supports both optimizations, where the former depends on the
server NIC(s) being SR-IOV capable. The blueprint includes the
following:

Expand Down

0 comments on commit 8d08703

Please sign in to comment.