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 B7853941430 for ; Fri, 20 Oct 2023 12:53:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3lwSI/+Ja/SF03kiKH7lk5ec5+5PgB8IU9T+HiaUcmo=; 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=1697806401; v=1; b=s47Fz0Nq7q7LXe1LU++bb/80eP6AdYja2U8llldiJ+0KV0nld0+PA4n6oKACAsE5GwrDhv4h bv6cgpm3TH8t0Vw8jA+sH5FJtRoLwohwDAqrhVpBxAJSUDuKfo7eE6xrT8h4GB8pMMFn8fD68rz daWdrcVuVk2z/qA0aO0qV0t8= X-Received: by 127.0.0.2 with SMTP id eiiRYY7687511xvxKDMHwOXD; Fri, 20 Oct 2023 05:53:21 -0700 X-Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mx.groups.io with SMTP id smtpd.web10.53388.1697806400715499693 for ; Fri, 20 Oct 2023 05:53:21 -0700 X-Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2c5210a1515so12600531fa.0 for ; Fri, 20 Oct 2023 05:53:20 -0700 (PDT) X-Gm-Message-State: 4BskfAhMlJoRB34dPxbEDRxPx7686176AA= X-Google-Smtp-Source: AGHT+IEyjg9TuOoBbZL7VPu/bx2mtzfgGEc7Q681O+14Zh5hRq2atnl2N3ON8/HU3uMGy/GdJZcA5A== X-Received: by 2002:a2e:b78f:0:b0:2c5:2813:5534 with SMTP id n15-20020a2eb78f000000b002c528135534mr1490221ljo.51.1697806398640; Fri, 20 Oct 2023 05:53:18 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id x22-20020a05651c105600b002b9e5fe86dasm350853ljm.81.2023.10.20.05.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 05:53:18 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: abner.chang@amd.com, isaac.w.oram@intel.com, AbdulLateef.Attar@amd.com, nicklew@nvidia.com, Konstantin Aladyshev Subject: [edk2-devel] [PATCH edk2-platforms v2 10/15] ManageabilityPkg: Return error on multiple-packet MCTP responses Date: Fri, 20 Oct 2023 15:52:57 +0300 Message-Id: <20231020125302.1459-11-aladyshev22@gmail.com> In-Reply-To: <20231020125302.1459-1-aladyshev22@gmail.com> References: <20231020125302.1459-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=s47Fz0Nq; 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 (#109860): https://edk2.groups.io/g/devel/message/109860 Mute This Topic: https://groups.io/mt/102080239/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-