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

subsys: Add MCTP as a subsystem, built on libmctp with bindings #75743

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

teburd
Copy link
Collaborator

@teburd teburd commented Jul 11, 2024

Adds libmctp as a zephyr module from my fork with a few small changes I intend on trying to upstream along with a binding to Zephyr's polling async UART API. Comes with a pair of sample applications that can be used on two boards connected via UART.

@teburd teburd changed the title Libmctp module modules: libmctp Jul 11, 2024
@teburd teburd requested review from nashif and KeHIntel July 11, 2024 00:48
@zephyrbot
Copy link
Collaborator

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
libmctp N/A teburd/libmctp@zephyr N/A

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-libmctp DNM This PR should not be merged (Do Not Merge) labels Jul 11, 2024
@teburd teburd added this to the v4.0.0 milestone Jul 11, 2024
@ubieda ubieda self-requested a review July 31, 2024 16:24
@teburd teburd force-pushed the libmctp_module branch 6 times, most recently from e32c677 to 44752b4 Compare August 8, 2024 15:47
@teburd teburd force-pushed the libmctp_module branch 2 times, most recently from bd7c893 to 153b02d Compare August 14, 2024 20:17
@teburd
Copy link
Collaborator Author

teburd commented Aug 14, 2024

Need to work out some upstream stuff, but can then have the fork setup in the zephyrproject-rtos github org

@teburd teburd added the TSC Topics that need TSC discussion label Aug 21, 2024
@teburd teburd mentioned this pull request Aug 21, 2024
@teburd teburd force-pushed the libmctp_module branch 4 times, most recently from 91652d2 to f884e0d Compare August 22, 2024 15:46
@teburd
Copy link
Collaborator Author

teburd commented Aug 22, 2024

In my original samples I had hacked up the serial binding to work with Zephyr natively, to better integrate with Zephyr however its useful to provide native bindings in a subsys so that's what I've begun to do.

doc/Makefile Outdated Show resolved Hide resolved
samples/modules/mctp/mctp_endpoint/CMakeLists.txt Outdated Show resolved Hide resolved
@teburd teburd force-pushed the libmctp_module branch 2 times, most recently from 29717fb to e1f9cbd Compare September 6, 2024 16:36
@teburd teburd force-pushed the libmctp_module branch 5 times, most recently from 63b3789 to 763f7ee Compare October 17, 2024 16:39
libmctp provides interfaces for wiring up a MCTP bus it calls bus
bindings. The bindings provided in libmctp however are not directly
useful to Zephyr without some work. Provide an initial uart binding that
directly uses Zephyr's async uart interface.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Samples work by sending MCTP encoded messages over a uart between two
boards.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds myself, nashif, and inteljiangwe1 to the maintainers file covering
the libmctp module.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
@teburd teburd added DNM This PR should not be merged (Do Not Merge) and removed DNM This PR should not be merged (Do Not Merge) labels Oct 18, 2024
@teburd teburd marked this pull request as ready for review October 18, 2024 16:11
@teburd
Copy link
Collaborator Author

teburd commented Oct 18, 2024

@henrikbrixandersen hopefully this shows better why Zephyr integration is needed with the latest binding and samples. I'd also note several folks are interested in this working with Zephyr including @KeHIntel @dkalowsk and @beriberikix

MCTP is also used in Meta's OpenBIC (https://github.com/facebook/OpenBIC) with Zephyr as well, though with its own implementation which... is exactly what this would help against.

There's still more I can envision happening here as well, multiplexing things over say the console uart (or any other transport) with mctp would be really nice (e.g. endpoints for shell/logging/tracing/etc). And is something I want to look into. This might require some DT integration to point logging/console at a pseudo uart (mctp endpoint). So perhaps describing mctp endpoints in DT would become a thing then.

@dkalowsk
Copy link
Contributor

Just confirming that the module repo would be moved to the zephyrproject and not continue to be housed in your personal GitHub account.

@teburd
Copy link
Collaborator Author

teburd commented Oct 18, 2024

Just confirming that the module repo would be moved to the zephyrproject and not continue to be housed in your personal GitHub account.

Yes it would be, and my changes upstreamed before merging. Marked DNM until this happens and the TSC approves.

I considered how I might write an MCTP uart test but this becomes pretty annoying to deal with. It's probably easier to have the samples become tests with a fixture (board to board) somehow. I'm very open to suggestion on the testing side of this, the samples absolutely work well.

@KeHIntel KeHIntel closed this Oct 21, 2024
@KeHIntel KeHIntel reopened this Oct 21, 2024
@KeHIntel
Copy link
Collaborator

Sorry, mistakenly clicked the close button 😂
Just want to see MCTP binding with I3C code, either in this PR or another PR. Thanks.

@teburd
Copy link
Collaborator Author

teburd commented Oct 21, 2024

Sorry, mistakenly clicked the close button 😂 Just want to see MCTP binding with I3C code, either in this PR or another PR. Thanks.

I3C binding indeed is on my todo list! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Process area: Samples Samples DNM This PR should not be merged (Do Not Merge) manifest manifest-libmctp TSC Topics that need TSC discussion
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants