Skip to content

[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

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

KFilipek
Copy link
Contributor

@KFilipek KFilipek commented Feb 4, 2025

Description

This PR introduces OS memory provider initial CTL support.

Fixes: #1062

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@KFilipek KFilipek self-assigned this Feb 4, 2025
@KFilipek KFilipek added the enhancement New feature or request label Feb 4, 2025
@KFilipek KFilipek force-pushed the task-ctl_by_handle branch 8 times, most recently from 18c4254 to 83b32fb Compare February 4, 2025 15:33
Copy link
Contributor

@lplewa lplewa left a 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.

@@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Typedef
  2. Please use umf_prefix

Copy link
Contributor Author

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);
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@KFilipek KFilipek force-pushed the task-ctl_by_handle branch 13 times, most recently from f33f86d to 99c90d5 Compare February 7, 2025 15:23
@bratpiorka bratpiorka added this to the v0.12.x milestone Feb 10, 2025
@KFilipek KFilipek force-pushed the task-ctl_by_handle branch 4 times, most recently from ec65bcc to a749deb Compare February 12, 2025 15:46
@KFilipek KFilipek marked this pull request as ready for review February 12, 2025 15:47
@KFilipek KFilipek requested a review from ldorau February 21, 2025 11:59
@bratpiorka
Copy link
Contributor

please add ctl.h to docs/config/api.rst

@KFilipek KFilipek marked this pull request as draft February 21, 2025 13:50
@KFilipek KFilipek force-pushed the task-ctl_by_handle branch 3 times, most recently from 346c1af to b091170 Compare February 25, 2025 09:50
@KFilipek KFilipek changed the base branch from main to v0.12.x-dev February 25, 2025 09:51
@KFilipek KFilipek marked this pull request as ready for review February 25, 2025 09:51
@KFilipek KFilipek force-pushed the task-ctl_by_handle branch 2 times, most recently from 30c9711 to 7f102c4 Compare February 25, 2025 13:36
@lukaszstolarczuk
Copy link
Contributor

@PatKamin, @lplewa , @ldorau - you requested changes, please re-review and/or approve

@bratpiorka
Copy link
Contributor

@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.
@lukaszstolarczuk lukaszstolarczuk merged commit dcd7c9c into oneapi-src:v0.12.x-dev Feb 26, 2025
79 checks passed
@KFilipek KFilipek deleted the task-ctl_by_handle branch February 28, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CTL - setting by handle
6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy