-
Notifications
You must be signed in to change notification settings - Fork 106
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
libspdm_device_send_message_func should be called with the timeout parameter #2904
Comments
For
whereas in "new" SPDM RTT is
I filed https://github.com/DMTF/SPDM-WG/issues/3726 to perhaps clarify the new text. Regardless of the interpretation, libspdm sending @lordaule for your use case, without any modification to libspdm, |
But that wouldn't actually be correct, because CT_EXPONENT is supposed to only apply to certain transactions, specifically when context->crypto_request true. But external to libspdm, spdm_context is a (void *) and there is no knowledge of whether the request being sent is a crypto request or not. When sending messages there is actually no such thing as a timeout - timeouts are only for measuring responses. But the API for send includes a timeout, presumably to enable just this type of atomic transaction model - except for the fact that the timeout provided to to context->send_message() differ from the timeout provided to context->receive_message() |
There are transports where the receiver acknowledges to the sender that it has received the message. For example PCIE non-posted writes. In such a case the sender can enforce a timeout on just sending the message. But
Pragmatically speaking if the value of Maybe |
@raghuncstate is doing BMC stuff as well. Maybe he can weigh in. |
Some BMC MCTP implementations are atomic, with send and receive as a single "transaction".
libspdm libspdm_register_device_io_func() splits these into two operations, each of which has a timeout parameter. However, the timeout provided to the send libspdm_device_send_message_func is only the RTT time, whereas the timeout provided to the receive libspdm_device_receive_message_func is the full calculated CT exponent time.
Instead, the full RTT+(ST1 or CTexp) time should be provided to the libspdm_device_send_message_func. For MCTP implementations which split send and receive, this should have no effect, as sends do not even use timeouts.
The text was updated successfully, but these errors were encountered: