-
Notifications
You must be signed in to change notification settings - Fork 40
[CTL] Add CTL by handle #1073
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
[CTL] Add CTL by handle #1073
Conversation
18c4254
to
83b32fb
Compare
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 whould also love to see "umf.pool.byhandle" in this PR. It should not be a huge extra work (this is literaly copy paste of umf.provider.byhandle", so extra work is a one extra entry in a pool and test). This would give use completed feature set"byhandle" as PR title says.
include/umf/base.h
Outdated
@@ -48,6 +48,16 @@ typedef enum umf_result_t { | |||
UMF_RESULT_ERROR_UNKNOWN = 0x7ffffffe ///< Unknown or internal error | |||
} umf_result_t; | |||
|
|||
/// @brief Type for determine the type of the CTL query | |||
enum ctl_query_type { |
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.
- Typedef
- Please use umf_prefix
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.
Done
src/ctl/ctl.c
Outdated
errno = EINVAL; | ||
goto out; | ||
} | ||
|
||
ret = ctl_exec_query[type](ctx, n, source, arg, indexes); | ||
|
||
char *extra_name = strstr(name, n->name); |
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.
This do not work correctly. First of all strstr is not "safe"
But also this finds "by_handle" node. So you pass to provider string which beggins from "by_handle" string. In find_node function we already parse ctl string, so you should get the information about when the name string is split, inside of this function
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.
Done
f33f86d
to
99c90d5
Compare
ec65bcc
to
a749deb
Compare
please add ctl.h to docs/config/api.rst |
e8e9a64
to
b15e360
Compare
346c1af
to
b091170
Compare
30c9711
to
7f102c4
Compare
7f102c4
to
210e9a2
Compare
@lplewa please resolve conversations |
This commit introduces the control and introspection mechanism that can be accessed using pointer to supported pool or provider.
This commit moves provider_priv and pool_priv members in internal structures due to compatibility issues. From now, adding new ops will not break accessing these members.
210e9a2
to
d319917
Compare
Description
This PR introduces OS memory provider initial CTL support.
Fixes: #1062
Checklist