Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pfNames selector to skip device with no PF name #235

Merged

Conversation

ahalimx86
Copy link
Collaborator

@ahalimx86 ahalimx86 commented May 25, 2020

Current behaviour of pfName selector adds devices that do not have
PF names available. For instance, if there is a PF attached to
igb_uio driver and VFs are created under that PF, those VFs will
have no PF name information. If a resource config prvides the
"pfName" selector any VFs under that PF(igb_uio driver) will
wrongly be added to that pool. This happens because this selector
matches PF name with string.HasPrefix() method and providing ""
for PF name results in true.

Fix: skip devices that do not have PF names when "pfNames" selector
is used.

Change-Id: I1ddd49743ef2e8f25718285e80c16dfcef4c90f5
Signed-off-by: Abdul Halim abdul.halim@intel.com

@zshi-redhat
Copy link
Collaborator

/lgtm

Current behaviour of pfName selector adds devices that do not have
PF names available. For instance, if there is a PF attached to
igb_uio driver and VFs are created under that PF, those VFs will
have no PF name information. If a resource config prvides the
"pfName" selector any VFs under that PF(igb_uio driver) will
wrongly be added to that pool. This happens because this selector
matches PF name with string.HasPrefix() method and providing ""
for PF name results in true.

Fix: skip devices that do not have PF names when "pfNames" selector
is used.

Change-Id: I1ddd49743ef2e8f25718285e80c16dfcef4c90f5
Signed-off-by: Abdul Halim <abdul.halim@intel.com>
@ahalimx86
Copy link
Collaborator Author

fixed typos in commit message

@abdallahyas
Copy link

/retest

@ahalimx86 ahalimx86 merged commit e873c48 into k8snetworkplumbingwg:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants