Enable SRIOV with DPDK

SRIOV and DPDK

SRI-IOV WorkerNode Prerequisites

In order for the cni-sriov-plugin to start reading Virtual Functions resources as well HostNetworkTemplate objects can configure virtual functions you need to perform the following steps.

  1. Enable** VT-D** at BIOS level.
  2. Enable SRIOV feature globally and/or per nic according to the nic you are working with, for example Intel x710 should be enabled per nic at BIOS level.
  3. Upgrade Kernel boot line to enable intel_iommu=on and iommu=pt
Copy

Huge page Support

Most network applications use huge pages, so you may want to enable that. Please edit /etc/default/grub and add huge-ages

Bash
Copy

Create SR-IOV ConfigMap

SR-IOV ConfigMap

Please copy paste the following definition update the values of your Physical Functions and ranges or Virtual Functions as well as Drivers and apply it to our cluster, in case that you have multiple nics, that each one uses different kernels drivers please omit the drivers section and just mentioned pfName within the selectors section.

SR-IOV Kernel Driver plus DPDK ConfigMap

YAML
Copy

Create NetworkAttachDefinition of DPDK type

YAML
Copy

Network Attach Definition Validation SR-IOV-DPDK type

Let’s validate our work by listing and describing our new Network Attach Definition

Bash
Copy
Bash
Copy

Create Pods with SR-IOV interfaces (DPDK Driver - vfio-pci)

YAML
Copy

Deploy the new pods

Bash
Copy

Validate Pods Creation with SR-IOV interfaces (DPDK - Driver vfio-pci)

Let’s validate your work by confirming that the created pods got successfully created by doing the following commands:

Bash
Copy

SR-IOV DPDK Driver - vfio-pci Validation

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard