SR-IOV Network Operator configuration#16679
Conversation
|
The preview will be available shortly at: |
There was a problem hiding this comment.
Do we have an estimated time on how long the installation would take? perhaps give a number here so that user has expectation on how long they shall wait.
There was a problem hiding this comment.
It mainly depends on how long the operator images can be downloaded from Internet, which it hard to predict in customer's environment.
There was a problem hiding this comment.
Shall we have a explanation for interfaces field, followed by this example?
for example, all the properties are for physical functions.
We have vendorID and deviceID mentioned in several places in the doc, but they may refer to PF or VF IDs depending on whether they are in a status field of SriovNetworkNodeState CR or in the spec field of SriovNetworkNodePolicy CR.
There was a problem hiding this comment.
The field under interfaces is quite straightforward. User shall be able to know what it is through the name.
There was a problem hiding this comment.
Might be good to explicitly mention VF in SR-IoV device, for example, use SR-IoV VF device
There was a problem hiding this comment.
The device ID should be PF's not VF's.
s/device hex/SR-IOV PF device hex/
There was a problem hiding this comment.
Is there a simple command to query which SriovNetwork are in use by a particular pod?
There was a problem hiding this comment.
I don't think there is any.
There was a problem hiding this comment.
Is there any pre-requisite to meet before installing SR-IOV Operator?
For example, we only support SR-IOV deployment on baremetal environment, might want to call out this as a pre-requisite in a separate section. Other I can think of is when using SR-IOV in userspace mode (DPDK), user might want to configure hugepages which is not supported by SR-IOV Operator itself, worth a link to MCO doc for how to configure kernel args etc.
There was a problem hiding this comment.
Since we are giving an pod example here, might be good to also include the example of net-attach-def CR(sriov-rdma-mlnx) used here. This applies to dpdk example below as well.
There was a problem hiding this comment.
Might be good to add cpu in resources requests and limits because dpdk application always need to bind cpu.
There was a problem hiding this comment.
resources:
limits:
memory: "1Gi"
cpu: "2"
requests:
memory: "1Gi"
cpu: "2"
There was a problem hiding this comment.
I updated to this:
resources:
limits:
memory: "1Gi"
cpu: "2"
hugepages-1Gi: "4Gi"
requests:
memory: "1Gi"
cpu: "2"
hugepages-1Gi: "4Gi"
Is that okay? Or should hugepages be removed?
There was a problem hiding this comment.
I updated to this:
resources: limits: memory: "1Gi" cpu: "2" hugepages-1Gi: "4Gi" requests: memory: "1Gi" cpu: "2" hugepages-1Gi: "4Gi"Is that okay? Or should
hugepagesbe removed?
I think it's ok. DPDK application requires hugepages.
There was a problem hiding this comment.
Please add a note with link to kernel argument configurations (1G hugepage needs to be configured via kernel arguments, this config is supported via MCO). for example: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/nodes-nodes-kernel-arguments.adoc
Please also add a note for application using 2Mi hugepages (this doesn't require changing of kernel argument and can be configured via tuned Operator), link to the doc: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/configuring-huge-pages.adoc
There was a problem hiding this comment.
There was a problem hiding this comment.
I did not see isRdma option in the SriovNetworkNodePolicy CR in my env.
There was a problem hiding this comment.
isRdma is empty if not set : https://github.com/openshift/sriov-network-operator/blob/master/pkg/apis/sriovnetwork/v1/sriovnetworknodepolicy_types.go#L36
If you take a look at the device plugin configMap generated by operator, it shall be configured as False if not set.
There was a problem hiding this comment.
@zhaozhanqi is this still an issue in your test?
There was a problem hiding this comment.
@zshi-redhat yes, as you said, it's the false by default.
but I think we should add this one to template, here is the default template for now:
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
name: policy-1
namespace: sriov-network-operator
spec:
resourceName: intelnics
nodeSelector:
feature.node.kubernetes.io/sriov-capable: 'true'
priority: 99
mtu: 9000
numVfs: 6
nicSelector:
vendor: '8086'
rootDevices:
- '0000:01:00.1'
pfNames:
- eth1
deviceType: vfio-pci
There was a problem hiding this comment.
This should be VF device IDs according to my testing, otherwise device plugin will expose PF as resource.
There was a problem hiding this comment.
And we may also want to list a mapping of VF IDs to supported NICs so that user knows what to configure in node policy custom resource.
There was a problem hiding this comment.
This should be VF device IDs according to my testing, otherwise device plugin will expose PF as resource.
It's a bug, the deviceID shall always be set with the PF's ID. The operator shall convert it to the VF device ID when generating the device plugin configuration, if the numVFs is set. cc @zhaozhanqi
There was a problem hiding this comment.
@zhaozhanqi please help to confirm if that's the case in your testing.
There was a problem hiding this comment.
this should be PF deviceID since we do not know the vf device id yet before the nodenetworkpolicy is created.
- Vfs:
- deviceID: 154c
driver: iavf
mtu: 1500
pciAddress: '0000:3b:02.0'
vendor: '8086'
- deviceID: 154c
driver: iavf
mtu: 1500
pciAddress: '0000:3b:02.1'
vendor: '8086'
- deviceID: 154c
driver: iavf
mtu: 1500
pciAddress: '0000:3b:02.2'
vendor: '8086'
- deviceID: 154c
driver: iavf
mtu: 1500
pciAddress: '0000:3b:02.3'
vendor: '8086'
- deviceID: 154c
driver: iavf
mtu: 1500
pciAddress: '0000:3b:02.4'
vendor: '8086'
- deviceID: 154c
driver: iavf
mtu: 1500
pciAddress: '0000:3b:02.5'
vendor: '8086'
driver: i40e
vendor: '8086'
name: ens1f0
mtu: 1500
deviceID: 158b
numVfs: 6
pciAddress: '0000:3b:00.0'
totalvfs: 64
There was a problem hiding this comment.
The deviceID do not be set in the dpconfig if not set 'deviceID' in the policy. and the numVFs is also not be set
oc get configmap -n sriov-network-operator device-plugin-config -o yaml apiVersion: v1 data: config.json: '{"resourceList":[{"resourceName":"intelnetdevice","IsRdma":false,"selectors":{"vendors":["8086"],"drivers":["iavf","mlx5_core","i40evf","ixgbevf"],"pfNames":["ens1f0"]}}]}' kind: ConfigMap
|
@jboxman this PR may need another commit to fix opening comments. can you help on it? |
|
@zshi-redhat, I'm going to work through the comments here; I may open a new PR with the updated content after for a clean review. |
46112d9 to
9e2c742
Compare
9e2c742 to
b790a73
Compare
|
hi, @jboxman |
|
@zhaozhanqi, it doesn't conform to our contributing guide, so I've been rewriting it; the work for that will be complete in a few days. Thanks for your patience. |
|
What is a |
b790a73 to
4a6c27e
Compare
|
@pliurh @zshi-redhat @zhaozhanqi I've edited and reorganized the content. Can you take a look? Thanks! |
zshi-redhat
left a comment
There was a problem hiding this comment.
Thanks @jboxman for the update!
some minor comments inline.
The resourceName is a logic name for a group of sriov VFs. It can be referenced by the manifests of pod and net-att-def, if user want to allocate the VF to a pod. |
4a6c27e to
9119712
Compare
|
@zshi-redhat thanks! I've made those changes. @zhaozhanqi, can you confirm the content for this PR is okay? Thanks! |
There was a problem hiding this comment.
Add, "For Intel NIC, this value shall not be larger than the TotalVFs. For Mellanox NIC, this value shall not be larger than 128."
There was a problem hiding this comment.
@pliurh, what is TotalVFs in this context? Is it a configuration parameter in the CR? Or some fixed value for Intel?
There was a problem hiding this comment.
TotalVFs is the maximum number VF can be configured. For Intel NICs, it’s a static value. For Mellanox NICs it is variable with max value 128 for the NICs we claim to support, so it can be changed by the sriov operator when user specify the numVFs.
9119712 to
ce83395
Compare
|
@zshi-redhat @pliurh @zhaozhanqi I've made the requested changes; PTAL. Thanks! |
|
LGTM |
|
/lgtm |
|
I'm going to merge this, at long last! We can iterate on it more if necessary under cover of a new PR. |
|
/cherry-pick enterprise-4.3 |
|
@jboxman: #16679 failed to apply on top of branch "enterprise-4.3": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cherry-pick enterprise-4.2 |
|
@jboxman: #16679 failed to apply on top of branch "enterprise-4.2": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
So this ended up becoming the working PR for this.
This PR adds content for using the SR-IOV Network Operator.