mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * virt/vm_networking/virt-connecting-vm-to-sriov.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="virt-configuring-vm-project-dpdk_{context}"]
|
|
= Configuring a project for DPDK workloads
|
|
|
|
You can configure the project to run DPDK workloads on SR-IOV hardware.
|
|
|
|
.Prerequisites
|
|
* Your cluster is configured to run DPDK workloads.
|
|
* You have installed the {oc-first}.
|
|
|
|
.Procedure
|
|
. Create a namespace for your DPDK applications:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create ns dpdk-checkup-ns
|
|
----
|
|
|
|
. Create an `SriovNetwork` object that references the `SriovNetworkNodePolicy` object. When you create an `SriovNetwork` object, the SR-IOV Network Operator automatically creates a `NetworkAttachmentDefinition` object.
|
|
+
|
|
.Example `SriovNetwork` manifest
|
|
[source,yaml]
|
|
----
|
|
apiVersion: sriovnetwork.openshift.io/v1
|
|
kind: SriovNetwork
|
|
metadata:
|
|
name: dpdk-sriovnetwork
|
|
namespace: openshift-sriov-network-operator
|
|
spec:
|
|
ipam: |
|
|
{
|
|
"type": "host-local",
|
|
"subnet": "10.56.217.0/24",
|
|
"rangeStart": "10.56.217.171",
|
|
"rangeEnd": "10.56.217.181",
|
|
"routes": [{
|
|
"dst": "0.0.0.0/0"
|
|
}],
|
|
"gateway": "10.56.217.1"
|
|
}
|
|
networkNamespace: dpdk-checkup-ns <1>
|
|
resourceName: intel_nics_dpdk <2>
|
|
spoofChk: "off"
|
|
trust: "on"
|
|
vlan: 1019
|
|
----
|
|
<1> The namespace where the `NetworkAttachmentDefinition` object is deployed.
|
|
<2> The value of the `spec.resourceName` attribute of the `SriovNetworkNodePolicy` object that was created when configuring the cluster for DPDK workloads.
|
|
|
|
. Optional: Run the virtual machine latency checkup to verify that the network is properly configured.
|
|
. Optional: Run the DPDK checkup to verify that the namespace is ready for DPDK workloads.
|