Skip to content

MCTP Control Protocol codec#17

Open
embediver wants to merge 8 commits intoOpenPRoT:mainfrom
9elements:jl/mctp-control
Open

MCTP Control Protocol codec#17
embediver wants to merge 8 commits intoOpenPRoT:mainfrom
9elements:jl/mctp-control

Conversation

@embediver
Copy link
Copy Markdown
Collaborator

Implementation of a codec for MCTP Control Protocol messages.

Support for the following messages was implemented:

  • Get Endpoint ID
  • Set Endpoint ID
  • Get MCTP Version Support
  • Get MCTP Message Type Support

To support this, types for command/completion codes, message header and payload, and message supporting types where implemented.

For encoding/decoding a codec trait was introduced.

On top of the unit tests an example application is provided, which supports the Set Endpoint ID message.

@embediver embediver requested a review from wmaroneAMD December 18, 2025 18:34
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Dec 18, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@embediver
Copy link
Copy Markdown
Collaborator Author

Note: This is currently still a draft due to the following:

  • Code documentation is still missing
  • The example needs to be tested
    • Might require additional support of the Discovery Notify message
  • This PR depends on Features for MCTP Control Protocol #15 which is still open

@embediver
Copy link
Copy Markdown
Collaborator Author

The example now sends a Discovery Notify message on the bus / serial line to announce itself.
The Discovery Notify has an empty message body, so this is also already supported by the library.

Unfortunately the mctpd tool that I planned to use as bus owner does not support Discovery Notify messages (yet).
I read through the spec, but the Discovery Notify seems to be the only specified way for a hot-plug device to announce itself (at least for serial transport).

@embediver
Copy link
Copy Markdown
Collaborator Author

I removed the Discovery Notify again and tested the example with mctpd by triggering the address assignment over the d-bus interface.

I added a readme in the example folder, which describes how the test can be performed.

wmaroneAMD
wmaroneAMD previously approved these changes Mar 2, 2026
@wmaroneAMD
Copy link
Copy Markdown
Collaborator

@embediver Let me know if I can merge this

JonasLoeffelholz and others added 8 commits March 9, 2026 10:49
Signed-off-by: jonas loeffelholz <jonas.loeffelholz@9elements.com>

alter functions to be more agnostic to buffer sizes

Signed-off-by: jonas loeffelholz <jonas.loeffelholz@9elements.com>

add constructors

Signed-off-by: jonas loeffelholz <jonas.loeffelholz@9elements.com>
Signed-off-by: jonas loeffelholz <jonas.loeffelholz@9elements.com>
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
@embediver embediver marked this pull request as ready for review March 9, 2026 09:52
@embediver
Copy link
Copy Markdown
Collaborator Author

embediver commented Mar 9, 2026

Rebased onto main and fixed build for tests and standalone lib.

This PR should now be ready to be merged.

@embediver embediver requested a review from wmaroneAMD March 9, 2026 09:56
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