Bug 1798886

Summary: [sriov] user cannot set the only one VF which index is 0
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Peng Liu <pliu>
Networking sub component: SR-IOV QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium    
Version: 4.4   
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 11:34:15 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:

Description zhaozhanqi 2020-02-06 08:51:55 UTC
Description of problem:
in below code:
		if rngStart == 0 && rngEnd == 0 {
			rngEnd = ps.NumVfs - 1
		}

if the vfRange is $PF#0-0 that's mean the vfRange is all, thus user cannot set only 1 VF which index is 0 in the sriovnetworkpolicy. eg



Version-Release number of selected component (if applicable):
quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.4.0-202002050701-ose-sriov-network-operator
quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.4.0-202002050701-ose-sriov-network-webhook
quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.4.0-202002050701-ose-sriov-network-config-daemon

How reproducible:
always

Steps to Reproduce:
1. see $description
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 zhaozhanqi 2020-02-11 06:58:25 UTC
Verified this bug on quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.4.0-202002101346-ose-sriov-network-operator

  interfaces:
  - name: ens1f0
    numVfs: 5
    pciAddress: 0000:3b:00.0
    vfGroups:
    - deviceType: netdevice
      resourceName: intelnetdevice
      vfRange: 1-4
    - deviceType: netdevice
      resourceName: intelnetdevice2
      vfRange: 0-0



oc get node -o yaml | grep intel
      openshift.io/intelnetdevice: "4"
      openshift.io/intelnetdevice2: "1"
      openshift.io/intelnetdevice: "4"
      openshift.io/intelnetdevice2: "1"

Comment 5 errata-xmlrpc 2020-05-04 11:34:15 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, 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/RHBA-2020:0581