From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.67]) by mx.groups.io with SMTP id smtpd.web11.9089.1660030483928042790 for ; Tue, 09 Aug 2022 00:34:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=ZmKH8INB; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.223.67, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l5zuE0kCxYOaMAya48oAQaS/b5BuX2kpx89HGr0bj3jdbImOJWEW05HtrsANNvpmL446VVDjoxNR4u4LWqaKbban1lKt4MsYTzbRZYGI8l39uMDrsI6x/01HQ0L4igfkhvH8d9PqIkWUzEoj6npNFqg/TcoTakpWpUyKRthYVeTs/4sCR4MAj3tYgB1qTSGOOQyokG6v0cUC2PaUEfqWlNVmZzf21h0dzQl+jCfvGihPqLMBhf9CRR1KnKKlX/L1QA5gadcnuGusIUq9I4R9EuON+umh/q8vOlExEGzptXuF2Bv11Ixgpxp7QmXB79NVnqbzttj+NWxcTornrIOBTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RuY8cF37pQ+6hmxSOjwqZjM1wCHmQcMfXV7d0P5nNHA=; b=Vitlp5JobZw+lOQtm21ANpKdl0HLazy3FPTeS0AqVAFMp0xOXKRV+ATS5KC+kPQnsIRZDpm9fLah5AJN7H8qfjSj/mySnJnEdno1bi6FPELp2DSPblf8/LL8oT/nCZITsHOpSvqC47svkOaXLBKds8+xFOU/YM2bwGAOYvn0prfbhKCDwKkauNtSdVUmFxZnkA7sdbvMpZ6+xi9ZY/azp8RiTk7A0ZZHV91jmKo8Dtk0XPCcL1T99vSlpaL48MrfiLyIwEIjB02lFKZpRwNryyLrnVDkSPLCNLE5rmngthrsGDRhxJocy9BQy/kpAeo9v4Lo5/QuB2pfwlY4djOa1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RuY8cF37pQ+6hmxSOjwqZjM1wCHmQcMfXV7d0P5nNHA=; b=ZmKH8INBNe6dxID51aHHkfavAHLdu2aSLpH6Pu2IsbomQblnF0gk7+cJUF1jzy+FYLYTSFBLRpahCTGJdsBwxLpHXsIr6zHFzaZpdJbBrm1jBZSGASkTExfmUOjPmRc5rB5kn5igPTUyVYKoDxwGEqAbj4BSR1HQmy+IkHqmxQ0= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DM6PR12MB5520.namprd12.prod.outlook.com (2603:10b6:5:208::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Tue, 9 Aug 2022 07:34:42 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::e850:8264:41be:cb1f]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::e850:8264:41be:cb1f%4]) with mapi id 15.20.5504.020; Tue, 9 Aug 2022 07:34:41 +0000 From: "Chang, Abner" To: Igor Kulchytskyy , "devel@edk2.groups.io" CC: "nickle.wang@hpe.com" Subject: Re: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported Thread-Topic: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported Thread-Index: AQHYqljLKVm7X4buzUSN71MsFikpzK2mL5pg Date: Tue, 9 Aug 2022 07:34:41 +0000 Message-ID: References: <1659875125-9504-1-git-send-email-igork@ami.com> In-Reply-To: <1659875125-9504-1-git-send-email-igork@ami.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-08-09T07:34:38Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=f57f22fa-0c6c-4d05-8dc5-6b8f4c3a70a8; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 71572483-0c89-462e-b7eb-08da79d99f4e x-ms-traffictypediagnostic: DM6PR12MB5520:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gpElfiSAv36exCm5N4682KCs4VkyEqUERb7SdXHiDi7POrU6qUXLoO2TUPijhjgr47FpEhDL3k2bi88NMLwKhRzlOlNZJ5ym6ncpnlR+BjsRU5JlYhomSE8vZg50j4de/oLLxkbd34lb0aPPwIybTaSwx4AHWOgtas/yTr0OjnU0dkRN7IzU6d3Cv/BgUahBzVYSvzYRO4g4S8zgBQOLrReebmKuHNtcZkL0BWKUK+RH35PaB6Af06FTsn/Kue0Nk1XvhRxwiHX3uPcnTDns5NRf917rj7LQkdwHS/Klu5MbWlItOzgz34pQyel94apGQNIpIVUlP9tpUD0Phn/MnnH0YckZA6D6XTJ7fHB5QZsUfoohjHbciWhxj3nHeK3eLuEmgu8cYpoFQU1TuoDITxz50axk1oev8ZPvmOWWvHGihpcguw3f6VigiQ1f2II6f7IRryh4Ly1JEcvVpbVN9MxML3oGI8T94c4VJkY/Z4tksoPLC/esQYBBbZMMQ9Yy5AB4k7D0DUi62AkWfZj01mOJkntQ0gHTeYDd7UB6Ok4Ciw5lweX0zO9u91WfXqrlULYMSXypEknM0DAnQSc0kBcaGNVjlyBUzBqMW28WXvkw+uxHWvRT3XtCedo678EPEioswOPepjf7hhjDZCf/cj7E6ugxcW/JiJJN6Wj53klgjYaKYDLtQzxwdOHshBz/W2WtwQvAHy9Qr1UOMoTvmtbPKu1HiUY5+zuMHsNcXEA9TVovJjdd3K4Egl7YZ1QWR1vl7bikMqxi6vqJY/HkeQnM0rlZdqudjql+CFKD7h2sipGoZ+SVeVg9lOHswvs9 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(136003)(39860400002)(396003)(366004)(376002)(53546011)(2906002)(26005)(316002)(186003)(6506007)(7696005)(9686003)(71200400001)(41300700001)(110136005)(33656002)(40140700001)(86362001)(83380400001)(38100700002)(52536014)(122000001)(8936002)(76116006)(66946007)(66476007)(66556008)(478600001)(5660300002)(66446008)(55016003)(64756008)(4326008)(8676002)(38070700005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dO/HMSdRBQNRwQgvBx6EgTKyuVx7DYNfGTD1EZlkeNq3eMXJ3FaxB60ZPD6T?= =?us-ascii?Q?bOHdyTMFFcE04yJfzdCJ/sP0AjGBlJGVkYf4T9t/qt8FXIArEd5/wza026bm?= =?us-ascii?Q?dRAGnt57wisb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sX/LGkL48nvGRxGQW?= =?us-ascii?Q?1uEi3KPEW6cG6hswjYbL1c4NALaWdAZEnpTzODvoGdQdbsc2QC7utt/9Vet8?= =?us-ascii?Q?aSGzztcsZoGdFz5119nLBLmuLwOaHKkMgxGd86i1AoIJIsb8LXwFyICc+f1R?= =?us-ascii?Q?aUXrbg2ofUBSnf1zzN7ZiMzNx301K/HfnfTQrQ36kzGO4ZGGB0kXbBG8wBq7?= =?us-ascii?Q?FZjDfnzkn55w0c6ZNdmeenDiCqFJs8bzT7qwfZ5gtCtjfG+2nt4LKBDmjlAc?= =?us-ascii?Q?63nOHSlF1Yevns3DG2iYoE18o5VHSjJ08hZnu6dI9rlhGeNZQWZ+Dbn+fyDo?= =?us-ascii?Q?wyx90loXMGCFvfJv7dY9Eg8VK9cRWg0bcNik1oQOGpnkeilAHCXRIB+NMhJm?= =?us-ascii?Q?8lzldQefBRezdWOO8SXXr2otClLzfmO7HrGCTLWulUKemRX8eHOH9fFfRGq6?= =?us-ascii?Q?gTPfHEKV/cD9qijmiRHSSFoy1spbPfZoqAH7FTPOuZRFvjWBDdt3eOqIf/jq?= =?us-ascii?Q?gV9ep5q4wYDbaE3UZNKBVVdk8dg21J6mcPqqbxaaSemy4ValJJ03p5j60EdH?= =?us-ascii?Q?8tjsNh6IsTYpcz4or1cTomdLs8rr7xtexLGpXaSj?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71572483-0c89-462e-b7eb-08da79d99f4e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2022 07:34:41.3790 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OiDyMMBqWZjW8Sarm/qlOpk5r0ahctdQ5/MzwoT5tNljC4kMUBOE1v1SKIBVxDsU6BZkAtjr8WK751ag7LoM+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5520 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Hi Igor, my feedback is inline. > -----Original Message----- > From: Igor Kulchytskyy > Sent: Sunday, August 7, 2022 8:26 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nickle.wang@hpe.com; Igor > Kulchytskyy > Subject: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interfa= ce is > not supported >=20 > [CAUTION: External Email] >=20 > Host Interface details are discribed by the SMBIOS Type 42 table. > The table is published by the RedfishHostInterfaceDxe driver. > That driver supports PCI-E and USB host interface types. > The table is consumed by the RedfishGetHostInterfaceProtocolData function= in > the RedfishDiscoverDxe driver. > That function only supports PCI-E interface. >=20 >=20 > Cc: Abner Chang > Cc: Nickle Wang > Signed-off-by: Igor Kulchytskyy > --- > RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11 ++++++++= -- > - > 1 file changed, 8 insertions(+), 3 deletions(-) >=20 > diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c > b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c > index d79750b..a3b977f 100644 > --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c > +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c > @@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData ( > RecordTmp =3D (UINT8 *)Record + Offset; >=20 > // > - // Check Device Type, only PCI/PCIe Network Interface v2 is supp= orted > now. > + // Check Device Type, PCI/PCIe and USB Network Interface v2 is s= upported. > // > - if (*RecordTmp =3D=3D > REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) { > - ASSERT (SpecificDataLen =3D=3D sizeof > (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1); > + if ((*RecordTmp =3D=3D > REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp =3D=3D > REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) { > + if (*RecordTmp =3D=3D > REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){ > + ASSERT (SpecificDataLen =3D=3D sizeof > (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1); > + } > + if (*RecordTmp =3D=3D REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V= 2){ [Chang, Abner]=20 We can do if-else here because we only support two types of network device = now. Abner > + ASSERT (SpecificDataLen > sizeof > (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1); > + } > *DeviceDescriptor =3D (REDFISH_INTERFACE_DATA *)RecordTmp; > Offset =3D Offset + SpecificDataLen; > RecordTmp =3D (UINT8 *)Record + Offset; > -- > 2.6.1.windows.1 > -The information contained in this message may be confidential and propri= etary > to American Megatrends (AMI). This communication is intended to be read o= nly > by the individual or entity to whom it is addressed or by their designee.= If the > reader of this message is not the intended recipient, you are on notice t= hat any > distribution of this message, in any form, is strictly prohibited. Please= promptly > notify the sender by reply e-mail or by telephone at 770-246-8600, and th= en > delete or destroy all copies of the transmission.