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

mctpd: Handle discovery messages #16

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

Conversation

khangng-ampere
Copy link

@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)

Khang Nguyen added 5 commits October 6, 2023 10:39
This commit adds mctp_nl_addr_{add,del} helpers for sending
RTM_{NEW,DEL}ADDR messages. This mirrors the existing
mctp_nl_route_{add,del} helpers.

Signed-off-by: Khang Nguyen <[email protected]>
As per the DSP0238 spec, an endpoint needs to use physical addressing
to reply to discovery messages until it is assigned an EID.

This commit adds a helper to send physical addressed responses.

Signed-off-by: Khang Nguyen <[email protected]>
This commit adds support for Prepare for Endpoint Discovery messages
specified in DSP0236, section 12.13.

Signed-off-by: Khang Nguyen <[email protected]>
This commit adds support for Endpoint Discovery messages, specified in
DSP0236 section 12.14.

Signed-off-by: Khang Nguyen <[email protected]>
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 Nguyen <[email protected]>
@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
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.

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