From: "Konstantin Aladyshev" <aladyshev22@gmail.com>
To: devel@edk2.groups.io
Cc: abner.chang@amd.com, isaac.w.oram@intel.com,
AbdulLateef.Attar@amd.com, nicklew@nvidia.com,
Konstantin Aladyshev <aladyshev22@gmail.com>
Subject: [edk2-devel] [PATCH edk2-platforms 10/10] ManageabilityPkg: Return error on multiple-packet MCTP responses
Date: Mon, 16 Oct 2023 16:18:16 +0300 [thread overview]
Message-ID: <20231016131816.6634-11-aladyshev22@gmail.com> (raw)
In-Reply-To: <20231016131816.6634-1-aladyshev22@gmail.com>
Since the current driver doesn't yet support handling of
multiple-packet MCTP responses, return EFI_UNSUPPORTED error in such
cases.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
.../MctpProtocol/Common/MctpProtocolCommon.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
index 4aae4fcba9..7cf2d916f4 100644
--- a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
@@ -524,6 +524,17 @@ CommonMctpSubmitMessage (
FreePool (ResponseBuffer);
return EFI_DEVICE_ERROR;
}
+ if ((MctpTransportResponseHeader->Bits.StartOfMessage != 1) ||
+ (MctpTransportResponseHeader->Bits.EndOfMessage != 1) ||
+ (MctpTransportResponseHeader->Bits.PacketSequence != 0)) {
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: Error! Multiple-packet MCTP responses are not supported by the current driver\n",
+ __func__,
+ ));
+ FreePool (ResponseBuffer);
+ return EFI_UNSUPPORTED;
+ }
MctpMessageResponseHeader = (MCTP_MESSAGE_HEADER *)(MctpTransportResponseHeader + 1);
if (MctpMessageResponseHeader->Bits.MessageType != MctpType) {
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109643): https://edk2.groups.io/g/devel/message/109643
Mute This Topic: https://groups.io/mt/101994949/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-10-16 13:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 13:18 [edk2-devel] [PATCH edk2-platforms 00/10] MTCP-over-KCS support Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 01/10] ManageabilityPkg: Add definition for the MCTP KCS TRAILER structure Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 02/10] ManageabilityPkg: Check MCTP EIDs for reserved values Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 03/10] ManageabilityPkg: Support both MCTP and IPMI in KCS tranport library Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 04/10] ManageabilityPkg: Check header fields in the MCTP response Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 05/10] ManageabilityPkg: Correct typo in MCTP destination EID field Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 06/10] ManageabilityPkg: Update the algorithm of using MCTP endpoint ID PCD Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 07/10] ManageabilityPkg: Correct value for the MCTP TAG_OWNER response bit Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 08/10] ManageabilityPkg: Don't check MCTP header fields if transfer has failed Konstantin Aladyshev
2023-10-16 13:18 ` [edk2-devel] [PATCH edk2-platforms 09/10] ManageabilityPkg: Use correct constants for PLDM header checks Konstantin Aladyshev
2023-10-16 13:18 ` Konstantin Aladyshev [this message]
2023-10-18 5:52 ` [edk2-devel] [PATCH edk2-platforms 00/10] MTCP-over-KCS support Chang, Abner via groups.io
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231016131816.6634-11-aladyshev22@gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox