Bug 1983964 - Need Device plugin configuration for the NIC "needVhostNet" & "isRdma"
Summary: Need Device plugin configuration for the NIC "needVhostNet" & "isRdma"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: 4.10.0
Assignee: Sebastian Scheinkman
QA Contact: Ying Wang
URL:
Whiteboard:
Depends On:
Blocks: 2004146 2011430 2011435
TreeView+ depends on / blocked
 
Reported: 2021-07-20 09:57 UTC by Akash Dutta
Modified: 2022-03-12 04:36 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-12 04:36:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift sriov-network-operator pull 564 0 None open Bug 1983964: Support vhost ocp 2021-09-14 11:23:49 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-12 04:36:22 UTC

Description Akash Dutta 2021-07-20 09:57:01 UTC
Description of problem:
Need Device plugin configuration for the NIC
1) Add "needVhostNet": true for Intel NIC
2) Add "needVhostNet": true and "isRdma": true for Mellanox NIC

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Explanation from Redhat expert:
Hi Cristian,

Let me try to explain it.

The configuration for the vhost is done as part of the sriov-device-plugin configmap.
https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin#extended-selectors-for-device-type-netdevice
 
Our API change is needed because the sriov-operator is the one that creates and controls the confimap for the sriov-deviec-plugin.
It is not possible to change the configmap manually the sriov-operator will/should override it.

So we need to extend the sriovNetworkNodePolicy CRD with the option to request vhost so the operator will add that flag when it creates the configmap for the sriov-device-plugin.

I hope this makes sense, if you have any other questions I am available.

Thanks!
Sebastian

Comment 1 Cristian Mandras 2021-07-30 11:24:24 UTC
Nokia is using vhost-net for fastpath dpdk applications on bare metal servers.
There is a check in the startup script to validate if /dev/vhost-net is present or not and that fails to start the container if it is not present.
vhostnet is used also as a communication path between slo and fast path in Nokia's application

Comment 3 Ying Wang 2021-09-27 06:10:30 UTC
Checked on version below, added "needVhostNet": true for Intel NIC and "needVhostNet": true, "isRdma": true for Mellanox NIC in sriovnetworknodepolicy.
Checked sriovnetworknodepolicy, the configurations are present.
Created sriovnetwork and pods which attached the VFs of intel/mellanox card.
Checked /dev/vhost-net was present in pods.

# oc get csv -n openshift-sriov-network-operator 
NAME                                         DISPLAY                   VERSION               REPLACES                                    PHASE
sriov-network-operator.4.10.0-202109231701   SR-IOV Network Operator   4.10.0-202109231701   sriov-network-operator.4.9.0-202109210853   Succeeded

# oc describe sriovnetworknodepolicies.sriovnetwork.openshift.io  mlx277netpolicy1 -n openshift-sriov-network-operator 
Name:         mlx277netpolicy1
Namespace:    openshift-sriov-network-operator
Labels:       <none>
Annotations:  <none>
API Version:  sriovnetwork.openshift.io/v1
Kind:         SriovNetworkNodePolicy
Metadata:
  Creation Timestamp:  2021-09-27T05:45:56Z
  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-27T05:45:56Z
  Resource Version:  2179571
  UID:               446919b0-70da-4047-b3a8-e0ad503a825a
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>


# oc describe sriovnetworknodepolicies.sriovnetwork.openshift.io intelpolicyens1f0 -n openshift-sriov-network-operator 
Name:         intelpolicyens1f0
Namespace:    openshift-sriov-network-operator
Labels:       <none>
Annotations:  <none>
API Version:  sriovnetwork.openshift.io/v1
Kind:         SriovNetworkNodePolicy
Metadata:
  Creation Timestamp:  2021-09-27T05:46:22Z
  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-27T05:46:22Z
  Resource Version:  2179739
  UID:               fecca1d3-f424-4d6d-a74f-bd4cd29f1f1a
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>

# oc get pods
NAME             READY   STATUS    RESTARTS   AGE
sriov-testpod    1/1     Running   0          14m
sriovpod-inetl   1/1     Running   0          14m

# 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
# 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# /dev/vhost-net
bash: /dev/vhost-net: Permission denied
bash-5.0# ls /dev/vhost-net
/dev/vhost-net
bash-5.0# exit
exit

Comment 7 errata-xmlrpc 2022-03-12 04:36:01 UTC
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.10.3 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-2022:0056


Note You need to log in before you can comment on or make changes to this bug.