-
Notifications
You must be signed in to change notification settings - Fork 299
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
Vf/4018/env variables #130
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a11da34
src/lib/hardware/vfio: get path to driver from environment variables
Greezlee aa79565
src/lib/hardware/vfio: get path to iommu_groups from environment vari…
Greezlee 7df2ce0
src/lib/hardware/vfio: function to check vfio availability
Greezlee 56e397e
src/lib/hardware/pci: get path to pci devices from environment variables
Greezlee f48c60a
src/lib/hardware/bus: use new functions to get path
Greezlee 9586972
src/apps/intel/intel_app: check vfio before test execution
Greezlee e67fa54
src/apps/vhost/vhost_user: check vfio before test execution
Greezlee 5c156cd
src/apps/intel/intel_app: get pci id for test from environment variables
Greezlee fe27336
src/apps/vhost/vhost_user: get pci id for test from environment varia…
Greezlee b64caea
src/core/memory: calculate size in bytes only if varialble is not null
Greezlee 5e59668
src/core/memory: get path to hugepages files from environment variables
Greezlee 1bc33ab
src/core/memory: get path to meminfo file from environment variable
Greezlee 022895c
src/Makefile: check exitcode of test
Greezlee 9a08c5b
src/doc/hacking.md: environment variables info added
vladfedin 5fb7079
core/app.lua, lib/hardware/pci.lua, vfio.lua: variable naming style f…
vladfedin 424d1df
src/apps/intel/intel_app.lua: pci id default removed, check added
vladfedin 22588ca
src/apps/vhost/vhost_user.lua: pci id default remived, checks added
vladfedin e33c4cd
src/doc/hacking.md: no defaults update, new variable added
vladfedin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Several environment variables can be set for snabbswitch code: | ||
|
||
* SNABB_VFIO_DRIVER | ||
Default value "/sys/bus/pci/drivers/vfio-pci" | ||
|
||
* SNABB_VFIO_IOMMU_GROUPS | ||
Default value "/sys/kernel/iommu_groups" | ||
|
||
* SNABB_PCI_DEVICE | ||
Default value "/sys/bus/pci/devices" | ||
|
||
* SNABB_HUGEPAGES | ||
Default value "/proc/sys/vm/nr_hugepages" | ||
|
||
* SNABB_MEMINFO | ||
Default value "/proc/meminfo" | ||
|
||
* SNABB_VHOST_USER_SOCKET_FILE | ||
No default value | ||
|
||
* SNABB_TEST_PCI_ID | ||
No default value | ||
|
||
You can run tests defining some of the variables: | ||
|
||
cd src; sudo SNABB_TEST_PCI_ID="0000:01:00.0" \ | ||
SNABB_VHOST_USER_SOCKET_FILE="vhost_user_test.sock" make test; | ||
|
||
if a test can't find resource needed it will usually skip and return code 43 | ||
(TEST_SKIPPED_CODE). | ||
|
||
Also separate commands can utilize environment virables changes: | ||
|
||
sudo SNABB_HUGEPAGES=/proc/sys/vm/nr_hugepages snabbswitch -l designs.basic.basic | ||
|
||
FIXME: add some sane examples and explanatory notes to variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I suggest we can have just two variables (names slightly changed from the above):
SNABB_TEST_VHOST_USER_SOCKET
filename of the vhost_user socket file.SNABB_TEST_INTEL10G_PCI_ID
PCI ID of an Intel 82599 network device.... which contain information that needs to be supplied by the developer to make the tests meaningful (otherwise they are better skipped).
I don't think that we need to have configuration options for the /proc and /sys paths (?) that should be consistent for Linux hosts.