-
Notifications
You must be signed in to change notification settings - Fork 92
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
Split get_version/get_capabilities/negotiate_algorithms request. #2406
base: main
Are you sure you want to change the base?
Conversation
59cc9eb
to
46050be
Compare
include/library/spdm_requester_lib.h
Outdated
* @retval LIBSPDM_STATUS_SUCCESS The request message is created in the buffer. | ||
**/ | ||
libspdm_return_t | ||
libspdm_build_request_get_version( |
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.
libspdm_return_t libspdm_*
should be on one line. There are many instances of this.
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.
Thanks. I have updated the style.
include/library/spdm_requester_lib.h
Outdated
@@ -24,6 +24,128 @@ | |||
**/ | |||
libspdm_return_t libspdm_init_connection(void *spdm_context, bool get_version_only); | |||
|
|||
/** |
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.
Since this is a new way to interact with libspdm messages these functions should go at, like, the bottom of this file. An Integrator will either use the classic way or this RESTful way and they shouldn't be mixed.
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.
Thanks. I have put the declarations to the bottom.
@@ -141,55 +141,27 @@ static bool validate_responder_capability(uint32_t capabilities_flag, uint8_t ve | |||
} | |||
|
|||
/** | |||
* This function sends GET_CAPABILITIES and receives CAPABILITIES. | |||
* This function builds GET_CAPABILITY request message. |
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.
GET_CAPABILITY
-> GET_CAPABILITIES
.
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.
Thanks. I have fixed it.
46050be
to
34fc89f
Compare
@Wenxing-hou Is there possibility to have |
@Wenxing-hou I did test these APIs and here are some of my findings: |
@PrithviAPai We talked about: you suspect that this issue may be related to the following logic, and I am checking it.
|
@Wenxing-hou one more thing is with this split we would need to support encryption and decryption |
@PrithviAPai , it is hard to debug an issue without real code. Could you please share your test code, or do some basic debug to see where the problem is?
I am not sure what you mean, can you share some code and let us know how you plan to use ? |
@jyao1 , here is my sample code which I used to test the PR.
|
Is my usage wrong here ? |
|
@PrithviAPai |
@Wenxing-hou thank you I will verify and let you know the results. Meanwhile how about the receive part ? How do we need to handle that ? Once we get response from device(SPDM endpoint) ? |
@Wenxing-hou @steven-bellock @jyao1 any suggestions on this ? |
The libspdm internal state should be managed correctly. Why you cannot call |
We are calling |
@PrithviAPai , maybe I am a little lost. Here we are discussing how to support SPDM Requester. Also, there is no |
Yes, this is about SPDM Requester. Sorry for the confusion |
See below:
Because you do not call the function and your own code does not backup the last_spdm_request, that is the reason on the failure. |
Okay I will try with calling |
Fix: #2394
Split get_version/get_capabilities/negotiate_algorithms request.