Skip to content

mctpd: support discovery requests #16

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

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

Conversation

khangng-ampere
Copy link
Contributor

@khangng-ampere khangng-ampere commented Oct 6, 2023

This PR adds support for replying to discovery messages, when mctpd runs on an endpoint:

  • Prepare for Endpoint Discovery
  • Endpoint Discovery
  • Set Endpoint ID (updated to set assigned EID)

@jk-ozlabs
Copy link
Member

All look great, thanks.

We should probably include some top-level configuration on whether mctpd is running as an endpoint vs bus owner (and/or do we need to distingush a TMBO?). Even a command-line argument would be sufficient there.

For example, this would affect the Set Endpoint ID handling; in bus-owner mode, we would reject all Set Endpoint ID commands; rather than being conditional on whether an EID is already assigned. In endpoint mode, it should be totally fine for the bus owner to reassign EIDs.

Is that something you'd like to do? If not, I can implement as a base change.

@khangng-ampere
Copy link
Contributor Author

khangng-ampere commented Jan 22, 2024

@jk-ozlabs Sorry for the late reply. I made a MR to add the BO configuration at #14, if that is what you meant.

@jk-ozlabs
Copy link
Member

@jk-ozlabs Sorry for the late reply. I made a MR to add the BO configuration at #14, if that is what you meant.

Ah! Thank you. I should have started there.

@khangng-ampere khangng-ampere marked this pull request as draft July 28, 2025 05:33
Currently, mctpd handles Set EID message as a bus owner, which
means it assumes it has at least one local EID and rejects all
Set Endpoint ID requests.

This commit handles the case where mctpd runs on an endpoint
and it has no EID set yet.

Signed-off-by: Khang D Nguyen <[email protected]>
This adds support for the Discovered flag and discovery requests,
as described in DSP0236
12.14 Prepare for Endpoint Discovery and
12.15 Endpoint Discovery.

Signed-off-by: Khang D Nguyen <[email protected]>
@khangng-ampere khangng-ampere marked this pull request as ready for review July 28, 2025 06:01
@khangng-ampere
Copy link
Contributor Author

I figured it might be a good time to refresh those patches :) Added a basic test case to exercise the new path, and check for Bus Owner as discussed above.

@khangng-ampere khangng-ampere changed the title mctpd: Handle discovery messages mctpd: support discovery requests Jul 28, 2025
@jk-ozlabs
Copy link
Member

How does this relate to #16? should I check that one out first, or this one?

@khangng-ampere
Copy link
Contributor Author

khangng-ampere commented Jul 28, 2025

How does this relate to #16? should I check that one out first, or this one?

@jk-ozlabs Do you mean #96 (set endpoint ID)? This one is based on top of Set Endpoint ID so you should review that one first.

Discovery process contains setting EID, so I think basing this on Set Endpoint ID makes more sense. Set Endpoint ID also works standalone, and not every transport requires discovery

@jk-ozlabs
Copy link
Member

Sorry, yes, #96. OK, will start there.

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.

2 participants