Skip to content

Conversation

@ShitalJumbad
Copy link
Contributor

fix #3045

@ShitalJumbad ShitalJumbad marked this pull request as draft October 29, 2025 18:49
@ShitalJumbad ShitalJumbad force-pushed the fix-3045 branch 8 times, most recently from f072069 to b00d055 Compare November 3, 2025 15:45
@ShitalJumbad ShitalJumbad marked this pull request as ready for review November 4, 2025 03:17

/**
* Vendor Response Callback Function Pointer.
* The library invokes this callback once. The integrator should:
Copy link
Contributor

Choose a reason for hiding this comment

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

The library invokes this callback once.

Can just delete this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

#if LIBSPDM_ENABLE_VENDOR_DEFINED_MESSAGES

/* expected number of bytes for VENDOR MESSAGE HEADERS */
#define SPDM_VENDOR_DEFINED_FIXED_HEADER_LEN 7
Copy link
Contributor

Choose a reason for hiding this comment

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

Pre-existing issue, but I do not see a reason for this #define to exist. I will file a separate issue for it.

/* length of spdm request/response header before payload start */
header_length = sizeof(spdm_vendor_defined_response_msg_t) + spdm_request->len +
/* reserve max vendor ID in header */
header_length = sizeof(spdm_vendor_defined_response_msg_t) + SPDM_MAX_VENDOR_ID_LENGTH +
Copy link
Contributor

@steven-bellock steven-bellock Nov 6, 2025

Choose a reason for hiding this comment

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

@ShitalJumbad We (mostly me) have been a little lazy in defining SPDM_MAX_VENDOR_ID_LENGTH as 255 bytes. Let me file an issue, resolve it with a pull request, and then you can rebase with the new value. This should simplify things so that you do not need to

compact payload after Vendor ID

Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/DMTF/SPDM-WG/issues/4396 has complicated things. Let me resolve that first.

Copy link
Contributor

Choose a reason for hiding this comment

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

After discussing this in the SPDM Working Group, for IANA CBOR the VendorId field is the CBOR-encoded tag number. As such its maximum size is nine bytes: 0xdb plus eight bytes for the tag number. I will update SPDM_MAX_VENDOR_ID_LENGTH to this more precise value.

Comment on lines 976 to 978
uint16_t *resp_standard_id,
uint8_t *resp_vendor_id_len,
void *resp_vendor_id,
Copy link
Contributor

Choose a reason for hiding this comment

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

@ShitalJumbad as discussed in the meeting today, please remove these parameters and have libspdm just copy the standard ID and vendor ID from the request to the response in libspdm_rsp_vendor_response.c.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

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.

vendor_response_get_id should not exist

2 participants