Skip to content
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

add mctp userspace lib support #76

Merged
merged 5 commits into from
Jan 8, 2025
Merged

add mctp userspace lib support #76

merged 5 commits into from
Jan 8, 2025

Conversation

parvathib
Copy link
Collaborator

  1. Adds the MCTP user library API and includes a function in the example_app to test dummy SPDM messages in loopback mode.
  2. Define a separate instance to the secure SPDM.
  3. Add Alarm in the Mctp Mux layer to record the message reception time. (This is not propagated to the user yet)
  4. Pass the test flags to application build to filter out the code execution.

@@ -4,5 +4,5 @@

pub mod flash_partition;
pub mod mctp_driver;
pub mod mctp_mux;
pub mod mock_mctp;
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't this be under a feature flag to prevent inclusion in release?

Copy link
Collaborator Author

@parvathib parvathib Jan 6, 2025

Choose a reason for hiding this comment

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

The test code that creates this mock instance (this is under feature flag test-mctp-capsule-loopback) is compiled out in the release builds. The release binary should not have this included.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the module inclusion also needs to be under feature flag

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added it under feature flag

runtime/capsules/src/mctp/driver.rs Outdated Show resolved Hide resolved
runtime/capsules/src/mctp/driver.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@swenson swenson left a comment

Choose a reason for hiding this comment

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

LGTM other than Vishal's comment that it would be good to put the mod mock_mctp; under a #[cfg(..)] to double-ensure that it is not included in the released binary.

@parvathib parvathib requested a review from vsonims January 8, 2025 15:38
@parvathib parvathib merged commit ae37e04 into main Jan 8, 2025
1 check passed
@parvathib parvathib deleted the pbhogaraju/mctp-userlib branch January 8, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants