[WIP] Add IPC tests (umfIpcTest) to the devdax provider#839
Closed
ldorau wants to merge 7 commits intooneapi-src:mainfrom
Closed
[WIP] Add IPC tests (umfIpcTest) to the devdax provider#839ldorau wants to merge 7 commits intooneapi-src:mainfrom
umfIpcTest) to the devdax provider#839ldorau wants to merge 7 commits intooneapi-src:mainfrom
Conversation
vinser52
reviewed
Oct 25, 2024
| size_t offset; // offset in the file used for memory mapping | ||
| utils_mutex_t lock; // lock of ptr and offset | ||
| unsigned protection; // combination of OS-specific protection flags | ||
| bool ipc_consumer_only_mode; // when path==NULL and size==0 |
There was a problem hiding this comment.
I am not sure that we do need explicit ipc_consumer_only_mode flag. Alternatively we can allow path to be empty in that case allocations would not be possible.
Contributor
Author
There was a problem hiding this comment.
But path is not passed to all API ops.
Contributor
Author
There was a problem hiding this comment.
But
pathis not passed to all API ops.
Wait, it is.
Contributor
Author
There was a problem hiding this comment.
So, do you suggest to always check if (path == NULL) ? I think checking ipc_consumer_only_mode is more clear.
Contributor
Author
There was a problem hiding this comment.
BTW. please review #831 instead of this one
28ca1f4 to
d8f5695
Compare
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Add utils_align_ptr_down_size_up() to align a pointer down and a size up (for mmap()/munmap()). Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
ea33501 to
fdb5f29
Compare
umfIpcTest) to the devdax provider
fdb5f29 to
ebd8053
Compare
3 tasks
ebd8053 to
96dea9f
Compare
devdax_open_ipc_handle() has to use the path of the remote /dev/dax got from the IPC handle, not the local one. devdax_open_ipc_handle() has to use also the memory protection got from the IPC handle, so let's add the memory protection to the IPC handle. devdax_open_ipc_handle() should mmap only the required range of memory, not the whole /dev/dax device, so let's add the length of the allocation to the IPC handle. devdax_close_ipc_handle() should unmap only the required range of memory, not the whole /dev/dax device. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Some memory providers (currently the devdax and the file providers) do not support the free() operation (free() always returns the UMF_RESULT_ERROR_NOT_SUPPORTED error). Add the UMF_TEST_PROVIDER_FREE_NOT_SUPPORTED define and the get_umf_result_of_free macro() to ipcFixtures.hpp to enable running umfIpcTest tests when free() is not supported. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
96dea9f to
4e0e3aa
Compare
Contributor
Author
|
Replaced with #845 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Add IPC tests (
umfIpcTest) to the devdax provider.Checklist