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

zephyrbot commented Jul 11, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
libmctp 🆕 N/A (Added) zephyrproject-rtos/libmctp@fa15266 (zephyr) N/A

DNM label due to: 1 added project

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 2 times, most recently from 0cbc450 to ac40b51 Compare November 20, 2024 16:48
@teburd teburd removed the DNM This PR should not be merged (Do Not Merge) label Nov 20, 2024
@teburd
Copy link
Collaborator Author

teburd commented Nov 20, 2024

libmctp is now hosted by the zephyrproject which was the missing puzzle piece to removing the DNM. The TSC has already voted on this.

@teburd teburd removed the TSC Topics that need TSC discussion label Nov 20, 2024
@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Nov 20, 2024
Adds libmctp as a west module dependency

Signed-off-by: Tom Burdick <[email protected]>
@teburd teburd removed the DNM This PR should not be merged (Do Not Merge) label Nov 21, 2024
dkalowsk
dkalowsk previously approved these changes Nov 21, 2024
@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Nov 21, 2024
KeHIntel
KeHIntel previously approved these changes Nov 22, 2024
@teburd teburd removed the DNM This PR should not be merged (Do Not Merge) label Nov 22, 2024
@teburd
Copy link
Collaborator Author

teburd commented Nov 22, 2024

Small fixes to comments/board overlays since the initial PR passed CI and you +1'ed @dkalowsk, thanks!

@teburd teburd requested a review from dkalowsk November 22, 2024 15:28
Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

May I please request a README for the code sample? I appreciate the effort on the Doxygen docs—I really do!— but I think this needs slightly more, and the readme will be a great way to make this new subsystem more visible (and it is strictly speaking a requirement for all code samples anyway ;))

subsys/mctp/mctp_uart.c Show resolved Hide resolved
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 <[email protected]>
Samples work by sending MCTP encoded messages over a uart between two
boards.

Signed-off-by: Tom Burdick <[email protected]>
Adds myself, nashif, and inteljiangwe1 to the maintainers file covering
the libmctp module.

Signed-off-by: Tom Burdick <[email protected]>
@teburd
Copy link
Collaborator Author

teburd commented Nov 22, 2024

May I please request a README for the code sample? I appreciate the effort on the Doxygen docs—I really do!— but I think this needs slightly more, and the readme will be a great way to make this new subsystem more visible (and it is strictly speaking a requirement for all code samples anyway ;))

Done

@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Nov 22, 2024
@teburd teburd removed the DNM This PR should not be merged (Do Not Merge) label Nov 22, 2024
@teburd teburd requested review from KeHIntel and kartben November 22, 2024 22:46
{
switch (eid) {
case REMOTE_HELLO_EID:
LOG_INF("got mctp message %s for eid %d, replying to 5 with \"world\"", (char *)msg,
Copy link
Member

Choose a reason for hiding this comment

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

What does "replying to 5 with" mean here?

Copy link
Collaborator Author

@teburd teburd Nov 25, 2024

Choose a reason for hiding this comment

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

The endpoint it’s replying to, though I get that’s not necessarily clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants