Bug 1989342
| Summary: | containernetworking-plugins: Add dpdk support to host-device plugin | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Aaron Smith <aasmith> |
| Component: | Networking | Assignee: | Douglas Smith <dosmith> |
| Networking sub component: | multus | QA Contact: | zhaozhanqi <zzhao> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | unspecified | ||
| Version: | 4.9 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-10-18 17:43:52 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Verified this bug on 4.9.0-0.nightly-2021-08-19-180334
1. setup sriov operator with 4.9 version
2. init dpdk VF with following apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
name: intel-dpdk
namespace: openshift-sriov-network-operator
spec:
deviceType: vfio-pci
mtu: 1700
nicSelector:
deviceID: "158b"
pfNames:
- ens1f1
rootDevices:
- '0000:3b:00.1'
vendor: '8086'
nodeSelector:
feature.node.kubernetes.io/sriov-capable: 'true'
numVfs: 2
priority: 99
resourceName: inteldpdk
3. Check the VF pciAddress
vendor: "8086"
- Vfs:
- deviceID: 154c
driver: vfio-pci
pciAddress: 0000:3b:0a.0
vendor: "8086"
vfID: 0
- deviceID: 154c
driver: vfio-pci
pciAddress: 0000:3b:0a.1
vendor: "8086"
vfID: 1
4. Create net-attach-def in namespace z1
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: host-device
spec:
config: '{
"cniVersion": "0.3.1",
"type": "host-device",
"pciBusID": "0000:3b:0a.0"
}'
5. oc annotate net-attach-def host-device k8s.v1.cni.cncf.io/resourceName=openshift.io/inteldpdk -n z1
6. Create test pod with above net-attach-def
# cat pod/z1/intel-dpdk.yaml-hostdevice
apiVersion: v1
kind: Pod
metadata:
generateName: testpod1-
labels:
env: test
annotations:
k8s.v1.cni.cncf.io/networks: host-device
spec:
containers:
- name: appcntr1
image: quay.io/openshifttest/hello-sdn@sha256:d5785550cf77b7932b090fcd1a2625472912fb3189d5973f177a5a2c347a1f95
imagePullPolicy: IfNotPresent
7. Check the pod is running
# oc get pod -n z1
NAME READY STATUS RESTARTS AGE
testpod1-lwz28 1/1 Running 0 14m
# oc rsh -n z1 testpod1-lwz28
/ # env | grep -i pci
PCIDEVICE_OPENSHIFT_IO_INTELDPDK=0000:3b:0a.1
Move this to verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3759 |
1. Feature Overview Make host-device plugin as a placeholder for a DPDK device when applications wants to attach the host-device with a pod container through network attachment definition. Name of feature: Add DPDK support to the host-device plugin 2. Feature Details The feature allows PCI devices that have been bound to a non-kernel driver to be attach to a pod. The feature skips actions tied to kernel netdev (e.g. IPAM) in a similar way as the SR-IOV CNI plugin. Kubernetes users would not need to use a special CNI plugin (i.e. NO-OP) when using virtio-net devices bound to the vfio driver. 3. Business Justification Enables the use of accelerated OVS/OVN-dpdk interfaces in a Shift on Stack deployment. Business impact? To be updated The feature has already been implemented upstream and this request to include the upstream feature in the downstream release. https://github.com/containernetworking/plugins/pull/490