-
Notifications
You must be signed in to change notification settings - Fork 29
mctpd: accept set endpoint ID as endpoint #96
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: accept set endpoint ID as endpoint #96
Conversation
521f10c
to
e6c85c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly looks good! just a few comments / queries inline.
Preparing the values and letting the caller OR multiple fields together should be preferred over assigning to their arguments. Signed-off-by: Khang D Nguyen <[email protected]>
e6c85c3
to
45707fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
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]>
45707fa
to
8b906b4
Compare
Sorry for the update, just missing one more |
This change takes a little long for me to push out, mainly because I am not sure how the specification interacts with our MCTP in-kernel infrastructure, where a single EID address can be assigned on multiple interfaces.
I think I mostly know how this maps to the spec now. The spec suggests:
This PR address the endpoint case, where it will accept the EID from every interfaces it is connected to.
Also, this PR also fixes the response for Bus Owner. Instead of rejecting with
0b01 EID assignment rejected
, this PR rejects withMCTP_CTRL_CC_ERROR_UNSUPPORTED_CMD
. Rejecting EID assignment is reserved for the case where a bridge is rejecting subsequent EID assignments from other bus owners it is connected to.