-
Notifications
You must be signed in to change notification settings - Fork 174
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
vhost-vdpa: fix env val not show #524
base: master
Are you sure you want to change the base?
Conversation
@lmilleri can you please take a look on this one? |
Well spotted, it looks good to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
/retest |
bc13534
to
76467f8
Compare
Pull Request Test Coverage Report for Build 7953738506Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@SchSeba Mellanox CI shows that ERROR: Error cloning remote repo 'SRIOV_NETWORK_DEVICE_PLUGIN',Can you tell me what the problem is? |
That is fine I think the MLX CI is not working right now. @e0ne can you please review this PR we need one more maintainer to approve before we can merge this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you modify unit-test to make sure getEnvVal does not depend on getDeviceSpecs ?[1]
[1]
It("should return object with the mounts", func() { |
@adrianchiris thanks for your advice. Passed the test after removing dip.GetDeviceSpecs(). |
/test |
Hi @makoto126, Thanks! |
vdpaPath is now assigned a value in NewVdpaInfoProvider. Signed-off-by: Ziteng Liu <ziteng.liu@jaguarmicro.com>
89057ea
to
1621075
Compare
In the Allocate implementation, getEnvs comes first and GetDeviceSpecs comes second.
But the GetEnvVal implementation of vdpaInfoProvider has vdpaPath assigned after the GetDeviceSpecs call.
This causes the vDPA device to be missing this environment variable the first time it is assigned, as follows:
PCIDEVICE_JAGUARMICRO_COM_JAGUAR_INFO={"0000:68:00.1":{"generic":{"deviceID":"0000:68:00.1"},"vdpa":{}}}
This can sometimes occur if multiple vDPA devices are requested(0000:68:00.1 has already been allocated once and 0000:68:00.2 is the first allocation):
PCIDEVICE_JAGUARMICRO_COM_JAGUAR_INFO={"0000:68:00.1":{"generic":{"deviceID":"0000:68:00.1"},"vdpa":{"mount":"/dev/vhost-vdpa-0"}},"0000:68:00.2":{"generic":{"deviceID":"0000:68:00.2"},"vdpa":{}}}
This PR solves the above problem.