Skip to content

mctpd: add initializer for MCTP control messages#95

Merged
jk-ozlabs merged 1 commit intoCodeConstruct:mainfrom
khangng-ampere:khangng/push-ppyqzywsztqo
Jul 28, 2025
Merged

mctpd: add initializer for MCTP control messages#95
jk-ozlabs merged 1 commit intoCodeConstruct:mainfrom
khangng-ampere:khangng/push-ppyqzywsztqo

Conversation

@khangng-ampere
Copy link
Copy Markdown
Contributor

Currently, RQDI bits initialization is duplicated in every message handler. This commit extracts those common logics into functions in mctp-control-spec.h.

Those logics are trivial so I picked the API based on what I think should be the most ergonomic to use, i.e arbitrary void* + size_t buffer in parameters, and return void* for casting into each MCTP control type message struct.

Copy link
Copy Markdown
Member

@jk-ozlabs jk-ozlabs left a comment

Choose a reason for hiding this comment

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

I like the use of the initialiser, but a couple of comments inline.

Comment thread src/mctp-control-spec.h Outdated
Comment thread src/mctp-control-spec.h
Comment thread src/mctp-control-spec.h Outdated
@khangng-ampere khangng-ampere force-pushed the khangng/push-ppyqzywsztqo branch from 6762bbc to c992c73 Compare July 22, 2025 03:14
Currently, RQDI bits initialization is duplicated in every message
handler. This commit extracts those common logics into functions in
mctp-control-spec.h.

Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
@khangng-ampere khangng-ampere force-pushed the khangng/push-ppyqzywsztqo branch from c992c73 to fa8e65d Compare July 22, 2025 03:28
@jk-ozlabs jk-ozlabs merged commit fa8e65d into CodeConstruct:main Jul 28, 2025
1 check passed
@jk-ozlabs
Copy link
Copy Markdown
Member

Thanks!

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