From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 54B63941713 for ; Mon, 23 Oct 2023 13:05:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cTXn1qQyscseRtpPoaAFo5b1P/3XtofOIVktgCJ7L2g=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1698066328; v=1; b=AEt1myFQC6X/j9oMW/RgKaIcZO0AFS1UiMCXADqNFqF/3UIsd4zTuvK2Pt10ubGaveKauIWw c9h8xOS4+E4VuPGfp5rY/9rDeirQDwWBT2LhnpP9C2l9FFZ6LGCmn+ZCKKevfahR+3WywFL/RIU NBZmszUDBNjeKR5bZwYw/d8c= X-Received: by 127.0.0.2 with SMTP id 4Go7YY7687511x0D5e4P3Cdb; Mon, 23 Oct 2023 06:05:28 -0700 X-Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mx.groups.io with SMTP id smtpd.web10.119848.1698066325594501203 for ; Mon, 23 Oct 2023 06:05:25 -0700 X-Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-507ac66a969so4388711e87.3 for ; Mon, 23 Oct 2023 06:05:25 -0700 (PDT) X-Gm-Message-State: qU9TdXMTnm5AVeKsli3C9iofx7686176AA= X-Google-Smtp-Source: AGHT+IHrZDN4tzl37I+5cNtOa12a9Prdx2/rRp6PgUR6ecjD+O2Ru8O2+FPoKBlt9SC8FkhqhjH0qg== X-Received: by 2002:a2e:3a03:0:b0:2c5:84c:62d3 with SMTP id h3-20020a2e3a03000000b002c5084c62d3mr6010175lja.5.1698066323402; Mon, 23 Oct 2023 06:05:23 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id r11-20020a2e994b000000b002b9e0d19644sm1550081ljj.106.2023.10.23.06.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:05:22 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: abner.chang@amd.com, AbdulLateef.Attar@amd.com, nicklew@nvidia.com, Konstantin Aladyshev Subject: [edk2-devel] [PATCH edk2-platforms v3 10/16] ManageabilityPkg: Return error on multiple-packet MCTP responses Date: Mon, 23 Oct 2023 16:05:05 +0300 Message-Id: <20231023130511.4521-11-aladyshev22@gmail.com> In-Reply-To: <20231023130511.4521-1-aladyshev22@gmail.com> References: <20231023130511.4521-1-aladyshev22@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,aladyshev22@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=AEt1myFQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 --- .../MctpProtocol/Common/MctpProtocolCommon.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpPr= otocolCommon.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/Mc= tpProtocolCommon.c index 4aae4fcba9..3709ab16eb 100644 --- a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolC= ommon.c +++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolC= ommon.c @@ -524,6 +524,17 @@ CommonMctpSubmitMessage ( FreePool (ResponseBuffer);=0D return EFI_DEVICE_ERROR;=0D }=0D + if ((MctpTransportResponseHeader->Bits.StartOfMessage !=3D 1) ||=0D + (MctpTransportResponseHeader->Bits.EndOfMessage !=3D 1) ||=0D + (MctpTransportResponseHeader->Bits.PacketSequence !=3D 0)) {=0D + DEBUG ((=0D + DEBUG_ERROR,=0D + "%a: Error! Multiple-packet MCTP responses are not supported by the = current driver\n",=0D + __func__=0D + ));=0D + FreePool (ResponseBuffer);=0D + return EFI_UNSUPPORTED;=0D + }=0D =0D MctpMessageResponseHeader =3D (MCTP_MESSAGE_HEADER *)(MctpTransportRespo= nseHeader + 1);=0D if (MctpMessageResponseHeader->Bits.MessageType !=3D MctpType) {=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109918): https://edk2.groups.io/g/devel/message/109918 Mute This Topic: https://groups.io/mt/102134658/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-