Added "needVhostNet": true for Intel NIC and added "needVhostNet": true and "isRdma": true for Mellanox NIC, creating sriovnetworknodepolicy, these parameters can be shown in description. [root@dell-per740-36 yingwang]# cat mlx277netpolicy1.yaml apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetworkNodePolicy metadata: name: mlx277netpolicy1 namespace: openshift-sriov-network-operator spec: mtu: 1800 isRdma: true needVhostNet: true nicSelector: deviceID: '1015' pfNames: - ens2f0 vendor: '15b3' nodeSelector: feature.node.kubernetes.io/sriov-capable: 'true' numVfs: 10 resourceName: mlx277netpolicy1 [root@dell-per740-36 yingwang]# cat intelpolicyens1f0.yaml apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetworkNodePolicy metadata: name: intelpolicyens1f0 namespace: openshift-sriov-network-operator spec: deviceType: netdevice needVhostNet: true nicSelector: deviceID: '158b' pfNames: - ens1f0 rootDevices: - '0000:3b:00.0' vendor: '8086' nodeSelector: feature.node.kubernetes.io/sriov-capable: 'true' numVfs: 5 priority: 99 resourceName: intelpolicyens1f0 [root@dell-per740-36 yingwang]# oc describe sriovnetworknodepolicies.sriovnetwork.openshift.io mlx277netpolicy1 Name: mlx277netpolicy1 Namespace: openshift-sriov-network-operator Labels: <none> Annotations: <none> API Version: sriovnetwork.openshift.io/v1 Kind: SriovNetworkNodePolicy Metadata: Creation Timestamp: 2021-09-23T08:55:16Z Generation: 1 Managed Fields: API Version: sriovnetwork.openshift.io/v1 Fields Type: FieldsV1 fieldsV1: f:spec: .: f:isRdma: f:mtu: f:needVhostNet: f:nicSelector: .: f:deviceID: f:pfNames: f:vendor: f:nodeSelector: .: f:feature.node.kubernetes.io/sriov-capable: f:numVfs: f:resourceName: Manager: kubectl-create Operation: Update Time: 2021-09-23T08:55:16Z Resource Version: 412656 UID: 61dc983e-15ba-4546-bbb5-20f1defe3ef3 Spec: Device Type: netdevice Is Rdma: true Link Type: eth Mtu: 1800 Need Vhost Net: true Nic Selector: Device ID: 1015 Pf Names: ens2f0 Vendor: 15b3 Node Selector: feature.node.kubernetes.io/sriov-capable: true Num Vfs: 10 Priority: 99 Resource Name: mlx277netpolicy1 Events: <none> [root@dell-per740-36 yingwang]# oc describe sriovnetworknodepolicies.sriovnetwork.openshift.io intelpolicyens1f0 Name: intelpolicyens1f0 Namespace: openshift-sriov-network-operator Labels: <none> Annotations: <none> API Version: sriovnetwork.openshift.io/v1 Kind: SriovNetworkNodePolicy Metadata: Creation Timestamp: 2021-09-23T09:18:53Z Generation: 1 Managed Fields: API Version: sriovnetwork.openshift.io/v1 Fields Type: FieldsV1 fieldsV1: f:spec: .: f:deviceType: f:needVhostNet: f:nicSelector: .: f:deviceID: f:pfNames: f:rootDevices: f:vendor: f:nodeSelector: .: f:feature.node.kubernetes.io/sriov-capable: f:numVfs: f:priority: f:resourceName: Manager: kubectl-create Operation: Update Time: 2021-09-23T09:18:53Z Resource Version: 420772 UID: e31cc0e4-21ee-469d-aa0c-3ff68f20a5cb Spec: Device Type: netdevice Is Rdma: false Link Type: eth Need Vhost Net: true Nic Selector: Device ID: 158b Pf Names: ens1f0 Root Devices: 0000:3b:00.0 Vendor: 8086 Node Selector: feature.node.kubernetes.io/sriov-capable: true Num Vfs: 5 Priority: 99 Resource Name: intelpolicyens1f0 Events: <none> [root@dell-per740-36 yingwang]# oc version Client Version: 4.8.0-0.nightly-2021-04-23-131610 Server Version: 4.9.0-rc.1 Kubernetes Version: v1.22.0-rc.0+75ee307 [root@dell-per740-36 yingwang]# oc get csv -n openshift-sriov-network-operator NAME DISPLAY VERSION REPLACES PHASE sriov-network-operator.4.9.0-202109210853 SR-IOV Network Operator 4.9.0-202109210853 Succeeded
created pods and attached Mellanox and intel VFs, and checked /dev/vhost-net was present in container. [root@dell-per740-36 yingwang]# oc get pods NAME READY STATUS RESTARTS AGE sriov-testpod 1/1 Running 0 12s sriovpod-inetl 1/1 Running 0 5s [root@dell-per740-36 yingwang]# oc exec sriov-testpod -it bash kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. bash-5.0# bash-5.0# bash-5.0# ls /dev/vhost-net /dev/vhost-net bash-5.0# exit exit [root@dell-per740-36 yingwang]# oc exec sriovpod-inetl -it bash kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. bash-5.0# bash-5.0# ls /dev/vhost-net /dev/vhost-net bash-5.0#
just to confirm, so it will be aupported in OCP4.9 right?
(In reply to meng-maggie.xu from comment #6) > just to confirm, so it will be aupported in OCP4.9 right? yes
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